tbuy
gemini-embedding-2-preview API pricing & access
gemini-embedding-2-preview API pricing: $0.2 per 1M tokens. gemini-embedding-2-preview. Listed specifications follow public vendor documentation. Avai…
gemini-embedding-2-preview API access
gemini-embedding-2-preview. Listed specifications follow public vendor documentation. Available features and limits depend on the selected serving channel.
Compare supported API endpoints and capabilities, then access gemini-embedding-2-preview through the unified API gateway.
- Category
- vector
- Context length
- 8192 tokens
- Supported APIs
- Gemini API, OpenAI Chat Completions API
- API endpoints
- POST /v1beta/models/gemini-embedding-2-preview:generateContent, POST /v1/chat/completions
- Input modalities
- text, image, video, audio, file
- Capabilities
- embeddings
- Also known as
- gemini-embedding-2
gemini-embedding-2-preview API pricing
- Base input price
- $0.2 per 1M tokens
- Base output price
- $0.8 per 1M tokens
Base prices are shown in USD before group-specific adjustments. Open the live pricing page for current access-group prices.
About gemini-embedding-2-preview
gemini-embedding-2-preview. Listed specifications follow public vendor documentation. Available features and limits depend on the selected serving channel.
Use cases and prompting
Use cases to explore
- Evaluate semantic search with representative queries and documents.
- Compare retrieval quality on your own knowledge base before connecting a downstream assistant.
Practical tips
Check whether the endpoint returns embeddings or reranks documents. Keep indexing and query preprocessing consistent.
How to call gemini-embedding-2-preview
gemini-embedding-2-preview is served through tbuy's unified gateway. Existing OpenAI or Anthropic SDK code keeps working: point base_url at https://modelsok.com and use your tbuy API key.
curl (OpenAI-compatible)
curl https://modelsok.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gemini-embedding-2-preview", "messages": [{"role": "user", "content": "Hello"}]}'Python (openai SDK)
from openai import OpenAI
client = OpenAI(base_url="https://modelsok.com/v1", api_key="YOUR_API_KEY")
response = client.chat.completions.create(
model="gemini-embedding-2-preview",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Related pages
Frequently asked questions about gemini-embedding-2-preview
What is gemini-embedding-2-preview?
gemini-embedding-2-preview. Listed specifications follow public vendor documentation. Available features and limits depend on the selected serving channel.
How do I call gemini-embedding-2-preview?
Create an API key with access to gemini-embedding-2-preview, then use the exact model ID and a supported endpoint from the API access section. Request fields depend on the selected endpoint.
How is gemini-embedding-2-preview priced?
Pricing depends on the selected provider group and the model billing unit. Refer to the current input, output, request, or media prices in the pricing section.
What is the context window of gemini-embedding-2-preview?
The model catalog lists a context window of 8192 tokens. Check the selected endpoint for request limits.
How should I evaluate gemini-embedding-2-preview for my project?
Check whether the endpoint returns embeddings or reranks documents. Keep indexing and query preprocessing consistent.