Authorizations
An Isaacus-issued API key passed as a bearer token via the Authorization
header in the format Authorization: Bearer YOUR_API_KEY
.
Body
A request to embed legal texts with an Isaacus legal AI embedder.
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.
[
"Are restraints of trade enforceable under English law?",
"What is a non-compete clause?"
]
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.
retrieval/query
, retrieval/document
"retrieval/query"
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.
drop_end
"drop_end"
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.
A whole number greater than or equal to 1.
x >= 1
1
Response
The content has been successfully embedded.
Embeddings of legal texts produced by an Isaacus legal AI embedder.
The embeddings of the inputs.
[
{
"index": 0,
"embedding": [-0.0258, 0.02062, -0.0114]
},
{
"index": 1,
"embedding": [-0.0358, -0.0128, 0.00251]
}
]
Statistics about the usage of resources in the process of embedding the inputs.
{ "input_tokens": 42 }