Skip to main content
POST
curl

Authorizations

Authorization
string
header
required

An account API key. Send it as Authorization: Bearer <key>.

Body

application/json

The request body of POST /v1/embeddings.

model
string
required

The model to embed with, named by its id or alias. An entry without the embeddings capability draws a refusal.

input
required

What to embed: strings, token ids, or arrays of either.

dimensions
integer<int64> | null

The vector length to ask for. The gateway bounds nothing and drops the key where the provider has no such parameter.

encoding_format
enum<string>
default:float

How the vectors come back. base64 costs precision, since the gateway holds them as 64-bit.

Available options:
float,
base64

Response

The vectors. data carries one row per input, each with its index; usage carries the token count behind the charge.

The answer to POST /v1/embeddings: one vector per input.

model
string
required

The catalog id of the model that answered, after alias resolution.

data
object[]
required

The vectors, one entry per embedded input, each carrying its own index.

usage
object
required

The token count this request bills on.

object
enum<string>

Always list.

Available options:
list