Gemini Embedding 2 Preview
Gemini Embedding 2 Preview is a preview of Google’s Gemini-based embedding model, returning 3,072-dimensional vectors for inputs of up to 2,048 tokens. It’s built for semantic search, retrieval and classification.
Quickstart
OpenAI-compatible: point any OpenAI SDK at the Venice base URL with a Venice API key.
curl https://api.venice.ai/api/v1/embeddings \
-H "Authorization: Bearer $VENICE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-embedding-2-preview",
"input": "Private AI for everyone."
}'https://api.venice.ai/api/v1Parameters
| Parameter | Values |
|---|---|
model | gemini-embedding-2-preview |
input | A string, or up to 2,048 strings |
dimensions | Up to 3,072 |
encoding_format | float | base64 |
LangChain’s OpenAIEmbeddings sends token IDs, which Venice rejects. Set check_embedding_ctx_length=False.
Vectors
Each input comes back as 3,072 numbers, or fewer when you ask for them with dimensions. Stored as float32, each number takes 4 bytes.
Each square is 64 dimensions, and each row 1,024.
Similarities from different models aren’t comparable, so store the model ID and dimensions with each vector.
Pricing
Billed per 1M input tokens, in USD.
Estimate a corpus
Specs
- Model ID
gemini-embedding-2-preview- Endpoint
POST /api/v1/embeddings- Dimensions
- 3,072, or fewer with
dimensions - Max input
- 2,048 tokens per input
- Batch
- Up to 2,048 inputs per request
- Encodings
floatorbase64- Input
- Text only
- Privacy
- Anonymized
- Weights
- Closed
- Added
- Apr 17, 2026
Compare
Every embedding model on Venice, cheapest first.
| Model | Dimensions | Per 1M tokens |
|---|---|---|
| BGE-EN-ICL | 4,096 | $0.0125 |
| Multilingual E5 Large Instruct | 1,024 | $0.0125 |
| Nemotron Embed VL 1B v2 | 2,048 | $0.0125 |
| Qwen3 Embedding 0.6B | 1,024 | $0.0125 |
| Qwen3 Embedding 8B | 4,096 | $0.0125 |
| Text Embedding 3 Small | 1,536 | $0.025 |
| BGE-M3 | 1,024 | $0.15 |
| Text Embedding 3 Large | 3,072 | $0.1625 |
| Gemini Embedding 2 Preview | 3,072 | $0.25 |