Completions

Create embeddings

Creates an embedding vector representing the input text or token arrays.

post/v1/embeddings

Request

Request body

modelstring required

ID of the model to use for generating embeddings.

encoding_format'float' | 'base64'

The format to return the embeddings in.

dimensionsinteger

The number of dimensions the resulting embeddings should have.

Example request

{
  "model": "text-embedding-ada-002",
  "dimensions": 1536
}

Response

Successful response with embeddings

modelstring required

The model used for generating the embeddings.

Changes

No recorded changes to this operation across all 1 revision of this API.