Gemini Embedding 2 is Google's first multimodal embedding model, released 2026-05, mapping text and images into a unified vector space for semantic search and RAG. It supports output dimensions from 128 to 3,072, with recommended sizes of 768, 1536, or 3,072. The model enables cross-modal retrieval—embedding a text query to find relevant images or the reverse—making it suited for multimodal search, recommendation, and document understanding.
This model is not routed on MirAPI yet — prices shown are the official list prices. Create an account to get notified when it goes live.
Modalities
inTextinImageinFileinAudioinVideooutVector
Price / 1M
$0.20 / —
Context
8K
Knowledge cutoff
—
Capabilities
VisionStructured output
Quick Start
import os from openai import OpenAI client = OpenAI( base_url="https://api.mirapi.ai/v1", # changed api_key=os.environ["MIRAPI_API_KEY"], # changed ) resp = client.chat.completions.create( model="google/gemini-embedding-2", messages=[{"role": "user", "content": "Hello"}], )
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.mirapi.ai/v1", // changed apiKey: process.env.MIRAPI_API_KEY, // changed }); const res = await client.chat.completions.create({ model: "google/gemini-embedding-2", messages: [{ role: "user", content: "Hello" }], });
curl https://api.mirapi.ai/v1/chat/completions \ -H "Authorization: Bearer $MIRAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "google/gemini-embedding-2", "messages": [{"role": "user", "content": "Hello"}] }'
Links
Wire Gemini Embedding 2 into your product
Start free1M free tokens to start · no card · OpenAI-compatible, one base_url change