Google: Gemini Embedding 2

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.

Modalities
inTextinImageinFileinAudioinVideooutVector
Price
$0.22/ 1M in
Context
8K
Released
May 20, 2026

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.

Provider
Discount
Input /M
Cache read /M
Officialstable
—
$0.22
—

Context pricing

This model’s price depends on how much input context a request carries. The headline price is the cheapest band, and a longer prompt moves the whole request into a higher one.

Input context
Input /M
Output /M
standardBase
$0.22
$0.00

Capabilities

Vision

Quick start

POST /v1/embeddings
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.embeddings.create(
    model="gemini-embedding-2",
    input="The quick brown fox",
)
vector = resp.data[0].embedding
# len(vector) — pass dimensions= to shorten it
Wire Gemini Embedding 2 into your product

1M free tokens to start, no card required. It’s OpenAI-compatible, so you only change the base URL.

Start free