Google's second-generation Gemini embedding model and the successor to gemini-embedding-001. Generates vector representations for semantic search, clustering, classification, and RAG at $0.20 per million text input tokens.
Test this model instantly in the Console Playground โ no code required
Copy usage instructions for Claude, ChatGPT, or other AI
| Token Type | Credits | USD Equivalent |
|---|---|---|
| Input Tokens | 372 | $0.25 |
| Output Tokens | 0 | $0.00 |
* 1,500 credits โ $1 (actual charges may vary based on usage)
curl -X POST "https://api.core.today/llm/gemini/v1beta/openai/embeddings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gemini-embedding-2",
"input": "What is the meaning of life?"
}'| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
input | string | array | Yes | - | Text or array of texts to embed. |
model | string | Yes | gemini-embedding-2 | Model identifier. |
dimensions | integer | No | 3072 | Output embedding dimensionality (MRL). Smaller values reduce storage and search cost; L2-normalize truncated vectors before cosine similarity. |
Generate embeddings for semantic search
curl -X POST "https://api.core.today/llm/gemini/v1beta/openai/embeddings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gemini-embedding-2",
"input": "What is the meaning of life?"
}'POST /llm/gemini/v1beta/openai/embeddings