---
title: "Embedding"
method: POST
path: "/embeddings"
tags: ["Embeddings"]
---

# Embedding

`POST /embeddings`

Vectorize content with an Isaacus embedding model.

## Request body

- EmbeddingRequest — A request to vectorize content with an Isaacus embedding model.
  - `model` 'kanon-2-embedder', required — The ID of the [model](https://docs.isaacus.com/models#embedding) to use for embedding.
  - `texts` union, required — The text or array of texts to embed. Each text must contain at least one non-whitespace character. No more than 128 texts can be embedded in a single request.
    - string[]
    - string
  - `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.
  - `dimensions` integer, nullable — A whole number greater than or equal to 1.

## Response `200`

Embeddings of texts produced by an Isaacus embedding model.

- EmbeddingResponse
  - `embeddings` Embedding[], required — The embeddings of the inputs.
    - `index` integer, required — The position of the content in the input array of contents, starting from `0` (and, therefore, ending at the number of contents minus `1`).
    - `embedding` number[], required — The embedding of the content represented as an array of floating point numbers.
  - `usage` EmbeddingUsage, required — Statistics about the usage of resources in the process of embedding the inputs.
    - `input_tokens` integer, required — The number of tokens inputted to the model.

## Other responses

- `400` — The request was invalid or could not be processed.
- `401` — The API key you provided does not exist, is expired or revoked, or is not authorized to access this resource.
- `402` — Your account is overdue, please pay any outstanding invoices to continue using our services.
- `403` — You are not allowed to access this resource.
- `413` — The request is larger than the server is willing or able to process.
- `500` — An unexpected error occurred while processing the request.

---

[API](https://skmtc.dev/isaacus-dev/apis/isaacus-api.md) · [All operations](https://skmtc.dev/isaacus-dev/apis/isaacus-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/isaacus-dev/isaacus-api/revisions/b650dd142971/schema)
