Skip to main content
POST
Submit an embedding request

Authorizations

Authorization
string
header
required

API key as bearer token in Authorization header

Body

application/json

Embeddings request input

input
required

Text, token, or multimodal input(s) to embed

Minimum string length: 1
Example:

"The quick brown fox jumps over the lazy dog"

model
string
required

The model to use for embeddings

Example:

"openai/text-embedding-3-small"

dimensions
integer

The number of dimensions for the output embeddings

Required range: x >= 1
Example:

1536

encoding_format
enum<string>

The format of the output embeddings

Available options:
float,
base64
Example:

"float"

input_type
string

The type of input (e.g. search_query, search_document)

Example:

"search_query"

provider
object | null

Provider routing preferences for the request.

Example:
session_id
string

A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters.

Maximum string length: 256
Example:

"session-1234"

trace
object

Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.

Example:
user
string

A unique identifier for the end-user

Example:

"user-1234"

Response

Embedding response

Embeddings response containing embedding vectors

data
object[]
required

List of embedding objects

Example:
model
string
required

The model used for embeddings

Example:

"openai/text-embedding-3-small"

object
enum<string>
required
Available options:
list
id
string

Unique identifier for the embeddings response

Example:

"embd-1234567890"

usage
object

Token usage statistics

Example: