Home › Model Docs › Google › gemini-embedding-2-preview

gemini-embedding-2-preview

Google · Embedding generation

Official input $0.200 and output $— per 1M tokens. No seller quote in stock right now.

Pricing

Billing unitPer million tokens
Official input$0.200 / 1M tokens
Official output—
Our input—
Our output—

Sellers set their own ask as a discount off the official list price, capped at 50%. The figure above is the deepest ask currently in force.

All prices are shown in US dollars; billing and settlement are in CNY.

Parameters

Context window8.2K tokens
Max outputnot published
Input modalitiestext, image, file, audio, video
Output modalitiesembeddings
Modality signaturetext+image+file+audio+video->embeddings
Best OpenRouter rank#271

Capabilities

Tool callingVision inputReasoningPrompt cachingStructured output

Monthly cost

Usage levelMonthly volume (example)At list priceAt our priceYou save
Prototyping2M in + 0M out tokens$0.40——
Small product20M in + 5M out tokens$4.00——
Mid-size service200M in + 50M out tokens$40.00——

Example volumes are for scale reference only — billing is per call, pay for what you use. Unit: USD per 1M tokens.

Closest alternatives

ModelVendorList price ($ per 1M input tokens)Our priceDiscount
gemini-embedding-2Google$0.200$0.2000.0% off
gemini-embedding-001Google$0.150$0.1500.0% off
voyage-4-largeVoyage AI$0.120$0.1200.0% off
voyage-multimodal-3.5Voyage AI$0.120$0.1200.0% off
voyage-code-4Voyage AI$0.120$0.1200.0% off
hunyuan-embeddingTencent Hunyuan$0.105$0.1050.0% off
Mistral Embed 2312Mistral$0.100$0.1000.0% off
Kinfra-VL-Embedding-8bKinfra$0.090$0.0900.0% off

The eight models nearest in list price on the same billing unit — the quickest way to judge whether this one is expensive at its tier. See live pricing for the full list.

How to call it

curl

curl https://ai.dijinlong.com/v1/embeddings \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemini-embedding-2-preview","input":["first passage","second passage"]}'

Python

from openai import OpenAI

client = OpenAI(base_url="https://ai.dijinlong.com/v1", api_key="YOUR_API_KEY")
resp = client.embeddings.create(model="gemini-embedding-2-preview", input=["first passage", "second passage"])
print(len(resp.data[0].embedding), "dims")

input accepts a single string or an array of strings; batching is much faster and cheaper than many single calls.

Other Google models

Explore

FAQ

How much does gemini-embedding-2-preview cost per million tokens?

The official price is $0.200 for input per 1M tokens. Prices are billed in CNY.

What is the context window of gemini-embedding-2-preview?

gemini-embedding-2-preview supports a context window of 8.2K tokens.