Creates an embedding vector representing the input text.
POST /embeddings
Authorizations
Request Body required
object
The string that will be turned into an embedding.
The array of strings that will be turned into an embedding.
The array of integers that will be turned into an embedding.
The array of arrays containing integers that will be turned into an embedding.
The format to return the embeddings in. Can be either float
or base64
.
The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3
and later models.
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Responses
200
OK
object
The list of embeddings generated by the model.
Represents an embedding vector returned by embedding endpoint.
object
The index of the embedding in the list of embeddings.
The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the embedding guide.
The object type, which is always “embedding”.
The name of the model used to generate the embedding.
The object type, which is always “list”.
The usage information for the request.
object
The number of tokens used by the prompt.
The total number of tokens used by the request.