---
title: "Create Embeddings"
method: POST
path: "/v1/embeddings"
tags: ["v1", "v1"]
---

# Create Embeddings

`POST /v1/embeddings`

Create embeddings using the configured provider.

## Request body

- CreateEmbeddingRequest — Schema for CreateEmbeddingRequest. Fields: - input (required): str | Annotated[list[str], MinLen(1), MaxLen(2048)] | Annotated[list[int], MinLen(1), MaxLen(2048)] | Annotated[list[Annotated[list[int], MinLen(1)]], MinLen(1), MaxLen(2048)] - model (required): str | Literal["text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large"] - encoding_format (optional): Literal["float", "base64"] - dimensions (optional): int - user (optional): str
  - `input` union, required — Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request.
    - string
    - string[]
    - integer[]
    - array[]
      - integer[]
  - `model` union, required — ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models) for descriptions of them.
    - string
    - 'text-embedding-ada-002' | 'text-embedding-3-small' | 'text-embedding-3-large'
  - `encoding_format` 'float' | 'base64' — The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).
  - `dimensions` integer — The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.
  - `user` string — A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).

## Response `200`

Successful Response

- CreateEmbeddingResponse — Response from embeddings endpoint.
  - `object` 'list' — Object type, always 'list'
  - `data` Embedding[], required — List of embedding objects
    - `object` 'embedding' — Object type, always 'embedding'
    - `embedding` union, required — The embedding vector (float array or base64 string)
      - number[]
      - string
    - `index` integer, required — Index of the embedding in the list
  - `model` string, required — The model used for embeddings
  - `usage` object, required — Usage statistics (prompt_tokens, total_tokens)

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/dedalus-labs/apis/dedalus-api.md) · [All operations](https://skmtc.net/dedalus-labs/apis/dedalus-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dedalus-labs/dedalus-api/versions/81ffcde15f4c/schema)
