v1

latestOpenAPI 3.1.02026-07-1730321418.0 KB
AI

Create Embeddings

Creates an embedding vector representing the input text.

Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.

post/v1/embeddings

Request body

dimensionsinteger nullable

The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.

encoding_format'float' | 'base64'
modelstring required

ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.

userstring nullable

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.

Response

Embedding created successfully

modelstring required

The name of the model used to generate the embedding.

objectstring required