Gemini Embedding 2 Preview is Google's first multimodal embedding model, released 2026-04. It maps text and images into a unified vector space for semantic search and retrieval-augmented generation, supporting cross-modal similarity so a text query can retrieve the most relevant images or vice versa. Output dimensions are flexible from 128 to 3,072, making it suited to multimodal search, recommendation, and document understanding pipelines.
Channels
Every channel serves the same model, but they differ in price and stability. On each API key in the Platform, you pick a primary and a backup channel per vendor, and each billing line shows which channel served the request.
Capabilities
Quick start
POST /v1/embeddingsimport 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.embeddings.create( model="gemini-embedding-2-preview", input="The quick brown fox", ) vector = resp.data[0].embedding # len(vector) — pass dimensions= to shorten it
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.mirapi.ai/v1", // changed apiKey: process.env.MIRAPI_API_KEY, // changed }); const resp = await client.embeddings.create({ model: "gemini-embedding-2-preview", input: "The quick brown fox", }); const vector = resp.data[0].embedding;
curl https://api.mirapi.ai/v1/embeddings \ -H "Authorization: Bearer $MIRAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gemini-embedding-2-preview", "input": "The quick brown fox" }'
Links
1M free tokens to start, no card required. It’s OpenAI-compatible, so you only change the base URL.