Embeddings

Creates an embedding vector representing the input text.

post/openai/v1/embeddings

Request body

encoding_format'float' | 'base64'

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

userstring nullable

A unique identifier representing your end-user, which can help us monitor and detect abuse.

Example request

{
  "input": "This is a test.",
  "encoding_format": "float"
}

Response

OK

modelstring required

The name of the model used to generate the embedding.

object'list' required

The object type, which is always "list".

Changes