Skip to main content
Core.Today
|
GoogleFastHigh

Gemini Embedding 2

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.

372/0credits
input / output ยท per 1M tokens
Successor to gemini-embedding-001 (retiring 2028-05-14)
Matryoshka Representation Learning (MRL) for flexible dimensionality
Optimized for semantic search, clustering, classification, and RAG
Text input billed at $0.20 per 1M tokens; no output-token charge

Run it right now

Test this model instantly in the Console Playground โ€” no code required

Sign in to try

Use with AI Assistant

Copy usage instructions for Claude, ChatGPT, or other AI

Model Specifications

Context Window
8K
tokens
Max Output
0
tokens
Training Cutoff
2025
Compatible SDK
OpenAI, Google AI

Capabilities

Vision
Function Calling
Streaming
JSON Mode
System Prompt

Token Pricing (per 1M tokens)

Token TypeCreditsUSD Equivalent
Input Tokens372$0.25
Output Tokens0$0.00

* 1,500 credits โ‰ˆ $1 (actual charges may vary based on usage)

Quick Start

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?"
}'

Parameters

ParameterTypeRequiredDefaultDescription
inputstring | arrayYes-Text or array of texts to embed.
modelstringYesgemini-embedding-2Model identifier.
dimensionsintegerNo3072Output embedding dimensionality (MRL). Smaller values reduce storage and search cost; L2-normalize truncated vectors before cosine similarity.

Examples

Text Embedding

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?"
}'

Tips & Best Practices

1Text input is billed at $0.20 per 1M tokens (371.6 credits/M); audio input is billed at $6.50 per 1M tokens. The OpenAI-compatible embeddings endpoint takes text input
2Vectors are not compatible with gemini-embedding-001 - re-embed your whole corpus when you switch
3Use a smaller `dimensions` value to cut vector storage and search cost
4Batch multiple texts in a single request for efficiency

Use Cases

Semantic search
Document clustering
Similarity matching
Recommendation systems
RAG (Retrieval-Augmented Generation)