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 is a retained platform embedding entry, with gemini-embedding-2 listed in its metadata. Current official documentation uses the stable ID gemini-embedding-2 for vectors from text, images, audio, video and PDFs in retrieval and similarity workflows.
Embeddings are numeric vectors rather than chat replies or generated media. Confirm the old platform name's mapping, keep indexing and queries on the same model and dimensions, and regenerate stored vectors when changing incompatible model spaces.
Official reference, checked 2026-10-14.
Use cases and prompting
- Fix dimensions and document chunking, then measure retrieval recall on labeled queries.
- Distinguish query and document prompts and use the selected model's supported task format.
- Store the vector model, dimensions and version; rebuild the index and retest similarity after upgrading.
- Compare the same test cases with gemini-embedding-2; check request and response formats in the API documentation.
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?
Start with the use cases and prompting guidance on this page, then evaluate the model with representative inputs from your project.