Google: gemini-embedding-2-preview
Gemini Embedding 2 Preview is Google's first multimodal embedding model. We currently support mapping text and images into a unified vector space for semantic search and retrieval-augmented generation (RAG). It supports input context up to 8,192 tokens and flexible output dimensions from 128 to 3,072 (recommended: 768, 1536, or 3,072). Designed for cross-modal similarity — you can embed a text query and retrieve the most relevant images, or vice versa — making it well-suited for multimodal search, recommendation, and document understanding pipelines.
Pricing
Current price per 1,000,000 tokens. Every request is billed automatically from its exact usage.
Statistics
Live performance and usage of this model, aggregated across all users.
API
Call this model from any OpenAI-compatible client using your API token.
https://apiex.cloud/api/v1/embeddings
<?php
$ch = curl_init( "https://apiex.cloud/api/v1/embeddings" );
curl_setopt_array( $ch, array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer YOUR_API_KEY",
"Content-Type: application/json",
),
CURLOPT_POSTFIELDS => json_encode( array(
"model" => "google/gemini-embedding-2-preview",
"input" => "Your text here",
) ),
) );
$response = json_decode( curl_exec( $ch ), true );
print_r( $response );
Authentication
Every request must include an Authorization: Bearer <TOKEN> header. Generate a token from your account's API Keys page — you can set its rate limit and IP restrictions.
Supported parameters
| Parameter | Type | Description |
|---|---|---|
model |
string, required | This model's ID, exactly as shown above. |
input |
string or array, required | The text (or list of texts) to embed. |
Frequently asked questions
What is gemini-embedding-2-preview?
Gemini Embedding 2 Preview is Google's first multimodal embedding model. We currently support mapping text and images into a unified vector space for semantic search and retrieval-augmented generation (RAG). It supports input context up to 8,192 tokens and flexible output dimensions from 128 to 3,072 (recommended: 768, 1536, or 3,072). Designed for cross-modal similarity — you can embed a text query and retrieve the most relevant images, or vice versa — making it well-suited for multimodal search, recommendation, and document understanding pipelines.
How much does gemini-embedding-2-preview cost?
Input tokens are priced at $0,24 per 1,000,000 tokens and output tokens at $0,00 per 1,000,000 tokens. Pricing is billed automatically per request; no separate plan is required.
What is the context length of gemini-embedding-2-preview?
gemini-embedding-2-preview supports a context window of up to 8,192 tokens.
Does gemini-embedding-2-preview support image input?
Yes, gemini-embedding-2-preview accepts image input in addition to text.
Which provider is gemini-embedding-2-preview from?
gemini-embedding-2-preview is developed by Google and made available on this gateway through our routing infrastructure.
When was gemini-embedding-2-preview added to this gateway?
gemini-embedding-2-preview has been available on this gateway since October 28, 2026.
Is gemini-embedding-2-preview currently available?
Yes, gemini-embedding-2-preview is active and can be used right now through this gateway.
Explore more models
Keep exploring
Ready to build with one API?
Create an account, make a key and send your first request in a few minutes.