Skip to main content
POST
/
api
/
v1
/
openai
/
embeddings
Create Embedding
curl --request POST \
  --url https://api.example.com/api/v1/openai/embeddings \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": [
    "<string>"
  ],
  "encoding_format": "float"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Corresponds to the arguments for OpenAI client.embeddings.create(...).

model
string
required
input
required
encoding_format
enum<string> | null
Available options:
float,
base64

Response

Successful Response