Embeddings

Create embeddings

Turn text into vectors for retrieval. OpenAI-compatible, so an existing client.embeddings.create() call works by changing the base URL and the model id.

Billed on input tokens only — an embedding response is a vector, so there is no completion side to charge for. usage.cost carries the exact price of the call.

No streaming: the vector arrives whole. Use GET /v1/models?type=embedding to list what is available.

post/embeddings

Request

  • Base URL: https://kymaapi.com/v1
  • URL: https://kymaapi.com/v1/embeddings
  • Auth: bearerAuth (a scheme the document does not define)

Request body

modelstring required

An embedding model id. A chat model here returns 400.

dimensionsinteger

Requested vector size, when the model supports truncation.

encoding_format'float' | 'base64'

Example request

{
  "model": "embeddinggemma-300m"
}

Response

One vector per input, in the order given.

objectstring
modelstring

Example response

{
  "object": "list",
  "model": "embeddinggemma-300m",
  "data": [
    {
      "object": "embedding"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.