Source: https://ailoot.ai/models/en/google-gemini-embedding-2-preview/
Canonical: https://ailoot.ai/models/en/google-gemini-embedding-2-preview/
Language: en

# Google: Gemini Embedding 2 Preview

[Markdown](https://ailoot.ai/models/en/google-gemini-embedding-2-preview/index.md) · [JSON](https://ailoot.ai/models/en/google-gemini-embedding-2-preview/facts.json)

## [Google: Gemini Embedding 2 Preview](https://ailoot.ai/models/en/google-gemini-embedding-2-preview/)

Gemini Embedding 2 Preview converts text, images, audio, video and PDF into numerical vectors in one multimodal space. Its separately documented preview profile supports cross-modal retrieval and comparison, an 8,192-token input and flexible vector dimensions.

- [**Ailoot Ultra · Embeddings** `POST /v1/embeddings` `google/gemini-embedding-2-preview`](https://ailoot.ai/models/en/google-gemini-embedding-2-preview/#method-0)

About the model

This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.

Gemini Embedding 2 Preview is Google’s named preview edition of its native multimodal embedding family. It maps text, images, video, audio and PDF into a shared numerical space, with semantic intent represented across more than 100 languages. The output is embeddings: vectors used to compare and retrieve related material. This preview identity remains separate from the stable Gemini Embedding 2 edition and does not imply interchangeable weights or an identical vector space.

The original announcement describes cross-modal search, classification, clustering, sentiment analysis and retrieval-augmented generation as downstream applications. A text query can find a related visual item, while an image or clip can also act as a search source. An application stores the representations, compares them and returns the corresponding records; a separate language model can use the retrieved source material to draft an answer. The embedding itself does not contain a natural-language explanation or transcript.

Its own model page documents an 8,192-token input limit and output dimensions from 128 to 3,072, with 768, 1,536 and 3,072 recommended sizes. The preview announcement gives a default of 3,072 and describes Matryoshka Representation Learning, which keeps useful information in shorter prefixes of the representation. Keep one chosen dimension for vectors that must be compared and retain the model edition with the collection, rather than merging representations simply because their lengths match.

The preview announcement documents up to six PNG or JPEG images per request, up to 120 seconds of MP4 or MOV video and PDF documents up to six pages. It also documents direct audio embedding without an intermediate text transcription. These specifications come from the preview’s own announcement, not from the later stable guide. The announcement does not establish every current audio-duration, codec or frame-sampling limit for this exact preview profile.

Interleaved multimodal input lets the representation reflect relationships between media, such as a picture and its caption. For a product catalogue, supply the photograph and approved description together when they describe one retrievable object. For a document collection, divide the source into focused passages or pages and preserve its title and position. For a media library, select a clip corresponding to the event users should find and keep its original time range with the stored record.

A useful retrieval task makes the intended relationship clear. A question seeking an explanation, a search for visually similar items and clustering by topic are different tasks even when they use the same source collection. Prepare the content consistently, record the edition and dimension and keep every vector linked to its source. Similarity supplies candidates for the application to inspect; it is not proof that two records state the same fact or that a retrieved source fully answers a question.

For a practical media search, represent the chosen image or video excerpt and compare it with the description of the desired content. Present the matching source alongside its caption or time range so a user can review it. For a knowledge assistant, retrieve the relevant page or passage before generating the written response. The Preview model’s role is the multimodal numerical representation that supports those selection steps, while storage, ranking rules and the final answer remain parts of the surrounding workflow.

**Ailoot Ultra · Embeddings** `POST /v1/embeddings` `google/gemini-embedding-2-preview`

[`google/gemini-embedding-2-preview`](https://ailoot.ai/models/en/#m=google%2Fgemini-embedding-2-preview&route=Ultra&caller=google%2Fgemini-embedding-2-preview&fmt=embeddings)

Google /`google/gemini-embedding-2-preview`

### Overview

Gemini Embedding 2 Preview converts text, images, audio, video and PDF into numerical vectors in one multimodal space. Its separately documented preview profile supports cross-modal retrieval and comparison, an 8,192-token input and flexible vector dimensions.

Accepted inputs

Text

Results

embedding

### Available in Ailoot · inputs & methods

**Ailoot Ultra · Embeddings** `POST /v1/embeddings`

Input types

`text`

Output types

`embedding`

Context

8,192 tokens

Output format

json

| Field | Type | Requirement | Values & limits | Default |
| --- | --- | --- | --- | --- |
| Field`model` | Type`string` | RequirementRequired | Values & limits google/gemini-embedding-2-preview | Default— |
| Field`input` | Type`string\|string[]` | RequirementRequired | Values & limits | Default— |

Input material combinations

**text\_to\_embedding**

Method parameters and lifecycle

| Parameter | Contract |
| --- | --- |
| Parameter`content_type` | Contractapplication/json |
| Parameter`required` | Contractmodel, input |
| Parameter`input_shapes` | Contractstring, string\[\] |
| Parameter`material_types` | Contracttext |

Lifecycle: `synchronous_json`

Keep every returned vector and index.

No image/audio/file-object support is inferred from this minimal text profile.

### Pricing

Tariff references do not add request options. Supported parameters are listed for the selected method.

Fast mode

Not specified When fast mode is selected

Flex mode

Not specified When flex mode is selected

Maximum reasoning effort

Not specified When maximum reasoning effort uses the default adjustment

#### Ailoot rates

#### Prices by configuration

| Configuration | Rate schedule | Charge |
| --- | --- | --- |
| ConfigurationBase token rates | Rate scheduleBase rate | Charge Input · Input tokens **$0.0004** / 1K tokens Output · Output tokens **$0** / 1K tokens Input · Cache read **—** / 1K tokens Input · Cache write **—** / 1K tokens Input · Cache write, 1 hour **—** / 1K tokens |

Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. [How reservation and settlement work →](https://ailoot.ai/docs/en/billing/reserve/)

### Example requests

#### Ailoot Ultra · Embeddings

Complete minimal JSON bodycurl · minimal text embeddings

```json
{
  "model": "google/gemini-embedding-2-preview",
  "input": [
    "First document",
    "Second document"
  ]
}
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
cat > embedding-request.json <<'JSON_REQUEST'
{
  "model": "google/gemini-embedding-2-preview",
  "input": [
    "First document",
    "Second document"
  ]
}
JSON_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/embeddings \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @embedding-request.json -o embedding-response.json
```

### Receive and save results

#### Ailoot Ultra · Embeddings

json

##### Keep all completed results

Keep every complete returned response, file and content part.

Keep every vector with its index. Vector count must equal input count; dimensions must be consistent.

##### If the original response needs checking

No embedding job endpoint is introduced.

Response fields

| Field | Type |
| --- | --- |
| Field`object` | Typestring |
| Field`model` | Typestring |
| Field`data[].index` | Typeinteger |
| Field`data[].embedding` | Typefinite float\[\] |
| Field`usage` | Typeobject |

Errors and next steps

| Response | Condition | Next step |
| --- | --- | --- |
| Response400 · `invalid_request_error` | ConditionMissing model or malformed JSON. | Next stepCorrect indicated fields. |
| Response413 · `invalid_request_error` | ConditionConfigured body limit exceeded. | Next stepReduce actual material. |
| Response422 · `invalid_request_error` | ConditionInput or controls violate current dedicated policy. | Next stepUse shown minimal text input without inherited controls. |
| Response503 · `billing_error` | ConditionAdmission or quote cannot be bound. | Next stepPreserve response; do not substitute a policy. |

### Aliases

#### Model aliases

**Ailoot Ultra** [`google/gemini-embedding-2-preview`](https://ailoot.ai/models/en/#m=google%2Fgemini-embedding-2-preview&route=Ultra&caller=google%2Fgemini-embedding-2-preview&fmt=embeddings)

#### Method path aliases

Use the method paths shown above.

#### Related caller IDs

[`google/gemini-embedding-2-preview`](https://ailoot.ai/models/en/#m=google%2Fgemini-embedding-2-preview&route=Ultra&caller=google%2Fgemini-embedding-2-preview&fmt=embeddings)

FAQ · Google: Gemini Embedding 2 Preview

What inputs and results are available?

`POST /v1/embeddings` · `google/gemini-embedding-2-preview`: `text` → `embedding`

Which fields does the request use?

`POST /v1/embeddings` · `google/gemini-embedding-2-preview`: `model`, `input`

What limits apply?

`POST /v1/embeddings` · `google/gemini-embedding-2-preview`: `ctx`: `8192`

Connect Ailoot to Claude Code, OpenCode, Hermes or your own app.

## The company and its project portfolio

The company and its project portfolio: millions of customers; monthly sales in the billions.

## Buy tokens at a discount.

Subscription discounts for regular use. Promo codes offer up to 50% off token purchases.

Subscription

Choose a discounted plan for your regular requests.

Promo code: up to 50% off

Enter your code at checkout. The price updates to reflect the current promotion.

Spending in your history

The model, tokens and amount are recorded for each request.

[Choose a subscription](https://ailoot.ai/docs/en/billing/subscriptions/) · [View model prices](https://ailoot.ai/models/en/)

## Connect the API to a product you sell.

Use Ailoot in SaaS, apps and bots under its official service offer and licence agreement. Request a reseller licence for resale.

Commercial application

Add text, image, video and audio generation to paid features in your service.

Reseller licence

Send a description of your project and how you provide access. Request written terms for use and resale.

Documents on the website

The service offer, licence agreement and data processing policy are available before you connect.

[Request a reseller licence](mailto:support@ailoot.ai) · [Service offer and licence agreement](https://ailoot.ai/legal/offer?lang=en)

## Ailoot · The company and its project portfolio





Ailoot combines established operating experience, a large client base, stable service and ongoing KPI control.





The company and its project portfolio: millions of customers; monthly sales in the billions.





Ailoot brings that operating experience to API access for AI features in customer products, agents, applications and automations.
