> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixroute.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini Embedding 001

> Gemini Embedding 001: text embedding model. Request examples and parameters for MixRoute.

Gemini Embedding 001 is a text embedding model from Google.

Call `gemini-embedding-001` through MixRoute's native Gemini endpoint; an OpenAI-compatible endpoint is also supported.

## Key capabilities

* Gemini embedContent - Native Gemini embedding endpoint
* Vector embeddings - Convert text into numeric vectors
* Batch input - Accept a string or an array of strings
* Similarity workflows - Use vectors for search and clustering

## Quick example

### Gemini embedContent

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/models/gemini-embedding-001:embedContent" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "content": {
        "parts": [
          {
            "text": "MixRoute model API"
          }
        ]
      }
    }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests

    response = requests.post(
        "https://api.mixroute.ai/v1/models/gemini-embedding-001:embedContent",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        json={'content': {'parts': [{'text': 'MixRoute model API'}]}},
    )

    print(response.json())
    ```
  </Tab>
</Tabs>

### OpenAI-compatible Embeddings

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.mixroute.ai/v1/embeddings" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "model": "gemini-embedding-001",
      "input": "MixRoute model API"
    }'
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests

    response = requests.post(
        "https://api.mixroute.ai/v1/embeddings",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        json={'model': 'gemini-embedding-001', 'input': 'MixRoute model API'},
    )

    print(response.json())
    ```
  </Tab>
</Tabs>

## Parameters

### Gemini embedContent

| Parameter              | Type    | Required | Description                                 |
| ---------------------- | ------- | -------- | ------------------------------------------- |
| `content`              | object  | Yes      | Text content built from parts.              |
| `taskType`             | string  | No       | Embedding task type when supported.         |
| `outputDimensionality` | integer | No       | Requested output dimensions when supported. |

### OpenAI-compatible Embeddings

| Parameter    | Type            | Required | Description                          |
| ------------ | --------------- | -------- | ------------------------------------ |
| `model`      | string          | Yes      | Must be `gemini-embedding-001`.      |
| `input`      | string \| array | Yes      | Text to embed.                       |
| `dimensions` | integer         | No       | Requested dimensions when supported. |
