Skip to main content
POST
/
embeddings
Create embeddings
curl --request POST \
  --url https://api.ai-stats.phaseo.app/v1/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": "<string>",
  "encoding_format": "<string>",
  "dimensions": 2,
  "user": "<string>"
}
'
{
  "object": "<string>",
  "data": [
    {
      "object": "<string>",
      "embedding": [
        123
      ],
      "index": 123
    }
  ],
  "model": "<string>",
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  }
}
Embeddings are generated by routing text requests to the provider that currently offers the most accurate semantic vectors for your selected model. Although the Gateway primarily documents chat completions today, the same model catalogue powers every future embedding workflow. Use the Models catalogue to see which providers identify embeddings under their supported endpoints array. When the embedding POST endpoint becomes available you will reuse your API key and the same authentication headers as the other Gateway routes.

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
model
string
required
input
required
encoding_format
string
dimensions
integer
Required range: x >= 1
user
string

Response

200 - application/json

Embeddings response

object
string
data
object[]
model
string
usage
object