embeddings

Create Embedding

Changed on

OpenAI-compatible embeddings endpoint.

Authentication modes:

  • Master key + user field: Use specified user (must exist)
  • API key + user field: Use specified user (must exist)
  • API key without user field: Use the shared "default" user

A priced response carries its cost on usage as cost_usd (a six-decimal USD string) and pricing_source, as a chat completion does; an unpriced one carries neither.

post/api/v1/embeddings

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header Otari-Key
    • API key in header x-api-key

Request body

dimensionsinteger nullable
encoding_formatstring nullable
input_typestring nullable

What the input will be used for, for providers whose embedding depends on it: Cohere (search_document, search_query, classification, clustering, image) and Voyage (query, document). The provider validates the value. Any other provider answers 400, rather than embedding the input as if the field were absent.

modelstring required
userstring nullable

Response

Successful Response

modelstring required
object'list'

Changes

    • info

      added the new optional request property

    • breaking

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

    • info

      added the optional property to the response with the status

    • info

      added the optional 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