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

Changes

Changed in 3 of the 13 revisions of this API.10513

  • d714acb641bd49See the full diff
    • added the new required request property

      new-required-request-property

    • added the new required request property

      new-required-request-property

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

      request-body-type-changed

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

      response-body-type-changed

    • api operation id embeddings_handler removed and replaced with embeddings_create

      api-operation-id-removed

    • the endpoint scheme security bearerAuth was added to the API

      api-security-added

    • added the new optional request property

      new-optional-request-property

    • added the new optional request property

      new-optional-request-property

    • added the new optional request property

      new-optional-request-property

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • api tag Embeddings added

      api-tag-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 45e3254839bd653See the full diff
    • the request's body type changed from object to no type

      request-body-type-changed

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

      response-body-type-changed

    • removed the required property from the response with the status

      response-required-property-removed

    • removed the required property from the response with the status

      response-required-property-removed

    • removed the required property from the response with the status

      response-required-property-removed

    • removed the required property from the response with the status

      response-required-property-removed

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • api operation id embeddings_create removed and replaced with embeddings_handler

      api-operation-id-removed

    • the endpoint scheme security bearerAuth was removed from the API

      api-security-removed

    • api tag Embeddings removed

      api-tag-removed

    This revision also has 64 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog