v44

latestOpenAPI 3.0.0MITraw.githubusercontent.com2024-11-0494279768.0 KB
Embeddings

Creates an embedding vector representing the input text.

post/embeddings

Request body

encoding_format'float' | 'base64'

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

dimensionsinteger

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

userstring

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

Example request

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

Response

OK

modelstring required

The name of the model used to generate the embedding.

object'list' required

The object type, which is always "list".