v28

latestOpenAPI 3.1.0Apache 2.0raw.githubusercontent.com2026-03-11543173.3 KB
Embeddings

Embedding

Vectorize content with an Isaacus embedding model.

post/embeddings

Request body

model'kanon-2-embedder' required

The ID of the model to use for embedding.

task'retrieval/query' | 'retrieval/document' | 'null' nullable

The task the embeddings will be used for.

retrieval/query is meant for queries and statements, and retrieval/document is meant for anything to be retrieved using query embeddings.

If null, which is the default setting, embeddings will not be optimized for any particular task.

overflow_strategy'drop_end' | 'null' nullable

The strategy to employ when content exceeds the model's maximum input length.

drop_end, which is the default setting, drops tokens from the end of the content exceeding the limit.

If null, an error will be raised if any content exceeds the model's maximum input length.

dimensionsinteger nullable

A whole number greater than or equal to 1.

Example request

{
  "model": "kanon-2-embedder",
  "texts": [
    "Are restraints of trade enforceable under English law?",
    "What is a non-compete clause?"
  ],
  "task": "retrieval/query"
}

Response

Embeddings of texts produced by an Isaacus embedding model.

Example response

{
  "embeddings": [
    {
      "index": 0,
      "embedding": [
        -0.0258,
        0.02062,
        -0.0114
      ]
    },
    {
      "index": 1,
      "embedding": [
        -0.0358,
        -0.0128,
        0.00251
      ]
    }
  ],
  "usage": {
    "input_tokens": 42
  }
}
All 5 operations