Last refreshed 2026-05-22. Next refresh: weekly.
Why use Gemini Embedding 2 on Vercel AI Gateway?
Vercel AI Gateway offers Gemini Embedding 2 with pay-as-you-go pricing at $0.20/1M input tokens. Vercel AI Gateway is a unified AI proxy providing a single OpenAI-compatible API endpoint to 275+ models from 25+ providers including Anthropic, OpenAI, Google, Meta, Mistral, DeepSeek, xAI, Alibaba, Amazon, ByteDance, Cohere, MiniMax, MoonshotAI, KwaiPilot, Black Forest Labs, Recraft, Voyage AI, NVIDIA, and more.
Compare Gemini Embedding 2 across 2 providers to find the best fit for your use caseSetup recipe
Python + curlpip install openaiexport AI_GATEWAY_API_KEY=...import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["AI_GATEWAY_API_KEY"],google/gemini-embedding-2Request example
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["AI_GATEWAY_API_KEY"],
base_url="https://ai-gateway.vercel.sh/v1"
)
response = client.chat.completions.create(
model="google/gemini-embedding-2",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)Gotchas
- Use provider model ID "google/gemini-embedding-2", not the LLMReference slug "gemini-embedding-2".
- creator/model-name e.g. kwaipilot/kat-coder-pro-v2
- The examples expect AI_GATEWAY_API_KEY; rename it only if your application config maps the new variable.
Compare Gemini Embedding 2 Across Providers
| Provider | Input (per 1M) | Output (per 1M) |
|---|---|---|
| Google AI Studio | $0.20 | Free |
| Vercel AI Gateway | $0.20 | — |
Pricing
| Type | Price (per 1M) |
|---|---|
| Input tokens | $0.20 |
Capabilities
About Gemini Embedding 2
General availability release of Google's multimodal embedding model, released April 22, 2026. Generates 3072-dimensional vectors from text, images, documents, audio, and video inputs, mapping all modalities into a unified semantic space. Supports custom task instructions to optimize embeddings for retrieval, classification, clustering, or other goals. Output dimensionality is configurable via the output_dimensionality parameter. Priced at $0.20/1M input tokens. Distinct from gemini-embedding-2-preview (the earlier preview version). API ID: gemini-embedding-2.
FAQ
How does Vercel AI Gateway compare to other Gemini Embedding 2 providers?
Gemini Embedding 2 is available from 2 providers. The cheapest input pricing is $0.2/1M tokens from Google AI Studio.
What API model ID do I use for Gemini Embedding 2 on Vercel AI Gateway?
Use the model ID google/gemini-embedding-2 when calling Vercel AI Gateway's API.
Who created Gemini Embedding 2?
Gemini Embedding 2 was created by Google DeepMind as part of the Gemini Embedding model family.
Is Gemini Embedding 2 open source?
Gemini Embedding 2 is not open source; the seed data lists it as proprietary.