Skip to main content
POST
Create embeddings

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

ai_project_id
string | null

current project ID

Body

application/json
model
string
required

ID of the model to use.

Example:

"BAAI/bge-en-icl"

input
required

Input text to embed, encoded as a string or array of tokens.

Example:

"What's a nice vector, Victor?"

encoding_format
string | null
default:float

The format to return the embeddings in. Can be either float or base64.

user
string | null

A unique identifier representing your end-user.

service_tier
enum<string>
default:auto

The service tier to use for the request.

Available options:
auto,
default,
over-limit,
flex,
no-limit
Examples:

"auto"

"flex"

dimensions
integer | null

The dimensions to use for the request.

Example:

4096

Response

OK

object
string
required

always 'list'.

model
string
required

The model used for the embedding.

usage
Usage · object
required

Token usage stats.

data
Embedding · object[]
required

List of Embedding objects

service_tier
enum<string>
required

The service tier used for the request.

Available options:
auto,
default,
over-limit,
flex,
no-limit