Skip to content

Create Embeddings

POST
/v1/embeddings
  • Returns vector representations for the given input for use by ML models and algorithms
  • Creates embedding vectors that represent input text
  • input accepts a string or token array; pass an array of strings in one request for batch embeddings
  • Official docs: Embeddings

Authorizations

bearer
Type
HTTP (bearer)

Request Body

application/json
object

ID of the model to use. Use the List models API to see available models, or see the model overview for descriptions.

Input text to embed, encoded as a string or token array. To get embeddings for multiple inputs in a single request, pass an array of strings or an array of token arrays. Each input must not exceed 8192 tokens in length.

Responses

application/json
object
object[]
Required
object
Required

Playground

Authorization
Body

Samples