Embeddings

Create embeddings

Changed on

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

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
  }
}

Changes

    • breaking

      added the new required request property

    • breaking

      added the new required request property

    • breaking

      the request's body type changed from no type to object

    • breaking

      the response's body type changed from no type to object for status

    • info

      api operation id embeddings_handler removed and replaced with embeddings_create

    • info

      the endpoint scheme security bearerAuth was added to the API

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      api tag Embeddings added