---
title: "Create embeddings for text, image, and audio"
method: POST
path: "/embed"
tags: ["embed"]
---

# Create embeddings for text, image, and audio

`POST /embed`

<Note title="Note">
  This endpoint will be deprecated in a future version. Migrate to the [Embed API v2](/v1.3/api-reference/create-embeddings-v2) for continued support and access to new features.
</Note>

This method creates embeddings for text, image, and audio content.

Ensure your media files meet the following requirements:
- [Audio files](/v1.3/docs/concepts/models/marengo#audio-requirements).
- [Image files](/v1.3/docs/concepts/models/marengo#image-requirements).

Parameters for embeddings:
- **Common parameters**:
  - `model_name`: The video understanding model you want to use. Example: "marengo3.0".
- **Text embeddings**:
  - `text`: Text for which to create an embedding.
- **Image embeddings**:
  Provide one of the following:
  - `image_url`: Publicly accessible URL of your image file.
  - `image_file`:  Local image file.
- **Audio embeddings**:
  Provide one of the following:
  - `audio_url`: Publicly accessible URL of your audio file.
  - `audio_file`: Local audio file.

<Note title="Notes">
- The Marengo video understanding model generates embeddings for all modalities in the same latent space. This shared space enables any-to-any searches across different types of content.
- You can create multiple types of embeddings in a single API call.
- Audio embeddings combine generic sound and human speech in a single embedding. For videos with transcriptions, you can retrieve transcriptions and then [create text embeddings](/v1.3/api-reference/create-embeddings-v1/text-image-audio-embeddings/create-text-image-audio-embeddings) from these
- This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
</Note>

## Headers

- `x-api-key` string, required

## Response `200`

A text embedding has successfully been created.

- EmbeddingResponse — An object that contains the generated embedding vector and associated information.
  - `model_name` string, required — The name of the video understanding model the platform has used to create this embedding.
  - `text_embedding` TextEmbeddingResult — An object containing the generated embedding vector.
    - `error_message` string — Error message if the embedding generation failed.
    - `segments` BaseSegment[] — An object that contains the embedding.
      - `float` number[] — An array of floating point numbers representing the embedding. You can use this array with cosine similarity for various downstream tasks. Note that the example response was truncated for brevity.
  - `image_embedding` ImageEmbeddingResult — An object containing the generated embedding vector and associated information.
    - `error_message` string — Error message if the embedding generation failed.
    - `segments` BaseSegment[] — An object that contains the embedding.
      - `float` number[] — An array of floating point numbers representing the embedding. You can use this array with cosine similarity for various downstream tasks. Note that the example response was truncated for brevity.
    - `metadata` BaseEmbeddingMetadata — Metadata about the embedding.
      - `input_url` string — The URL of the media file used to generate the embedding. Present if a URL was provided in the request.
      - `input_filename` string — The name of the media file used to generate the embedding. Present if a file was provided in the request.
  - `audio_embedding` AudioEmbeddingResult — An object that contains the generated embedding vector and associated information.
    - `segments` AudioSegment[] — An object that contains the embedding and its start time.
      - `float` number[] — An array of floating point numbers representing the embedding. You can use this array with cosine similarity for various downstream tasks. Note that the example response was truncated for brevity.
      - `start_offset_sec` number, double — The start time in seconds from the beginning of the file.
      - `end_offset_sec` number, double — The end time in seconds from the beginning of the file.
    - `error_message` string — Error message if the embedding generation failed.
    - `metadata` BaseEmbeddingMetadata — Metadata about the embedding.
      - `input_url` string — The URL of the media file used to generate the embedding. Present if a URL was provided in the request.
      - `input_filename` string — The name of the media file used to generate the embedding. Present if a file was provided in the request.

## Other responses

- `400` — The request has failed.

---

[API](https://skmtc.net/twelvelabs/apis/twelvelabs-api.md) · [All operations](https://skmtc.net/twelvelabs/apis/twelvelabs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/twelvelabs/twelvelabs-api/revisions/5dbd6e8473c9/schema)
