> ## Documentation Index
> Fetch the complete documentation index at: https://client-integrations-api-dev.sequen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Embeddings API

> Return an embedding for a given text and, optionally, an image.

# Embeddings API

Return an embedding for a given text and, optionally, an image.

## Endpoint

```
POST /embed
```

## Request Body (`EmbedRequest`)

| Field         | Type   | Required | Description                               |
| :------------ | :----- | :------- | :---------------------------------------- |
| `text`        | String | Yes      | The input text for generating embeddings. |
| `image_bytes` | String | No       | Optional. Base64-encoded image bytes.     |
| `image_url`   | String | No       | Optional. The URL of the image.           |

## Example Request

<CodeBlock title="POST /embed Request Example (Text with Base64 Image)">
  ```json Example Body theme={null}
  {
    "text": "Industrial style workbench",
    "image_bytes": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMD..."
  }
  ```
</CodeBlock>

## Response Body (`EmbedResponse`)

Returns a JSON object containing the generated embedding.

| Field       | Type  | Description                                                         |
| :---------- | :---- | :------------------------------------------------------------------ |
| `embedding` | Array | A list of floating point numbers representing the embedding vector. |

## Example Response

<CodeBlock title="POST /embed Response Example (EmbedResponse)">
  ```json Example Response theme={null}
  {
    "embedding": [0.23, 0.56, 0.87, -0.12, 0.45, 0.78]
  }
  ```
</CodeBlock>

## Responses

* **`200 OK`**: Successful Response (`EmbedResponse`)
* **`422 Validation Error`**: (`HTTPValidationError`)
