Endpoints
Embedding
POST /embeddings
Vectorize content with an Isaacus embedding model.
Base URL: https://api.isaacus.com/v1
Request body
| Field | Type | Description |
|---|---|---|
model | string | The ID of the model to use for embedding. |
texts | array[string] | string | The text or array of texts to embed. |
task | enum (retrieval/query | retrieval/document | null) | The task the embeddings will be used for. |
overflow_strategy | enum (drop_end | null) | The strategy to employ when content exceeds the model’s maximum input length. |
dimensions | integer | null | The number of dimensions the embeddings should have, not exceeding the maximum dimensions of the model. |
model string
The ID of the model to use for embedding.
texts array[string]
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.
texts string
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.
task enum (retrieval/query | retrieval/document | null)
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 enum (drop_end | null)
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
The number of dimensions the embeddings should have, not exceeding the maximum dimensions of the model.
If null, the model’s default dimensions will be used.
Response
| Field | Type | Description |
|---|---|---|
embeddings | array[object] | The embeddings of the inputs. |
usage | object | Statistics about the usage of resources in the process of embedding the inputs. |
embeddings array[object]
The embeddings of the inputs.
index integer
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 array[number]
The embedding of the content represented as an array of floating point numbers.
usage object
Statistics about the usage of resources in the process of embedding the inputs.
input_tokens integer
The number of tokens inputted to the model.
See making requests for authentication, SDK usage, and errors.