A vector representation of an input. Similar vectors corresponds to semantically similar inputs.
See How to query embedding modelsOpen in new context
for code snippets using openai Python client.
Create an embedding
Generate an embedding.
path Parameters
project_idThe ID of the Project you want to target. If this value is not provided, your default Project will be used.
Specifying this value allows you to limit access through IAM policies, or to allocate consumption and billing to a specific project.
Create an embedding › Request Body
inputString or Array of strings to represent as embedding vector.
Maximum array items: 2048
modelUnique identifier of the model, such as bge-multilingual-gemma2.
Refer to our supported modelsOpen in new context list or /models endpoint for available models.
encoding_formatFormat of the embedding representation.
dimensionsNumber of dimensions to use for the embedding vector representation. Currently, the only supported value is that of the maximum dimensions of a modelOpen in new context. Lower values are not supported and vectors should not be trimmed, since available models do not support matryoshka embeddingsOpen in new context.
Create an embedding › Responses
idUUID of the response.
objectType of response object, always set to list.
createdTimestamp when the response was generated (Unix format, in seconds).
modelUnique identifier of the model.
List of embeddings.
Usage information generated by this request.