v1

latestOpenAPI 3.1.0Apache-2.02026-07-13136499.6 KB
Embeddings

Create embeddings

This endpoint follows the OpenAI API format for generating vector embeddings from input text. The handler receives pre-processed metadata from middleware and forwards the request to the selected node.

Returns

  • Ok(Response) - The embeddings response from the processing node
  • Err(AtomaProxyError) - An error status code if any step fails

Errors

  • INTERNAL_SERVER_ERROR - Processing or node communication failures
post/v1/embeddings

Request body

dimensionsinteger nullable

The number of dimensions the resulting output embeddings should have.

encoding_formatstring nullable

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

modelstring required

ID of the model to use.

userstring nullable

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

Example request

{
  "encoding_format": "float",
  "input": "The quick brown fox jumped over the lazy dog",
  "model": "intfloat/multilingual-e5-large-instruct",
  "user": "user-1234"
}

Response

Embeddings generated successfully

modelstring required

The model used for generating embeddings

objectstring required

The object type, which is always "list"

Example response

{
  "data": [
    {
      "object": "embedding"
    }
  ],
  "model": "intfloat/multilingual-e5-large-instruct",
  "object": "list",
  "usage": {
    "prompt_tokens": 8,
    "total_tokens": 8
  }
}