Embeddings

Generate vector embeddings from text for semantic search, clustering, and RAG applications.

Endpoint

POST/v1/embeddings

Request body

modelstringrequired
ID of the embedding model.
inputstring | arrayrequired
Text to embed. String or array of strings.
encoding_formatstring
float or base64. Default: float
dimensionsinteger
Number of dimensions. Model-dependent.

Example request

curl https://api.aetherapi.dev/v1/embeddings \
  -H "Authorization: Bearer sk-aetherapi-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-embedding-3-small",
    "input": "Hello world"
  }'

Example response

{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "embedding": [
        -0.0021610260009765625,
        -0.049072265625,
        0.0209808349609375,
        ...
      ],
      "index": 0
    }
  ],
  "model": "text-embedding-3-small",
  "usage": {
    "prompt_tokens": 2,
    "total_tokens": 2
  }
}

Supported embedding models