# Gemini Embedding 2

> Gemini Embedding 2 is Google's first multimodal embedding model, mapping text, images, video, audio, and PDFs into one 3,072-dimension vector space for cross-modal semantic search, document retrieval, and recommendations over 100+ languages. Upstream accepts 8,192 input tokens and MRL-truncates to 128–3,072 dimensions. AnyRouter exposes the text path only — the OpenAI-compatible /embeddings body is a text `input`, so the extra upstream modalities are deliberately not declared here.

**ID**: `google/gemini-embedding-2`  
**Creator**: Google  
**Category**: embedding  
**Context**: 8K tokens  
**Input**: $0.20/M  
**Output**: $0  
**Released**: 2026-04-22  
**Web page**: https://anyrouter.dev/model/google/gemini-embedding-2

**Input modalities**: text  
**Output modalities**: embeddings  

**Tokenizer**: Gemini

**Capabilities**: embedding

**Supported parameters**: input, model, dimensions, encoding_format

## Usage

**Endpoint**: `POST https://anyrouter.dev/api/v1/embeddings`

```bash
curl https://anyrouter.dev/api/v1/embeddings \
  -H "Authorization: Bearer $ANYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "google/gemini-embedding-2",
  "input": "The quick brown fox jumps over the lazy dog"
}'
```

Pass `input` as a string or an array of strings to embed a batch in one call.

## Providers

| Provider | Input | Output |
| --- | --- | --- |
| openrouter-byok | $0 | $0 |

## Source

- Upstream docs: https://openrouter.ai/google/gemini-embedding-2
