POST
/
classifications
/
universal
import os
from isaacus import Isaacus

client = Isaacus(
    api_key=os.environ.get("ISAACUS_API_KEY"),  # This is the default and can be omitted
)
universal_classification = client.classifications.universal.create(
    model="kanon-universal-classifier",
    query="This is a confidentiality clause.",
    texts=["I agree not to tell anyone about the document."],
)
print(universal_classification.classifications)
{
"classifications": [
{
"index": 0,
"score": 0.8825573934438159,
"chunks": [
{
"index": 0,
"start": 0,
"end": 46,
"score": 0.8825573934438159,
"text": "I agree not to tell anyone about the document."
}
]
}
],
"usage": {
"input_tokens": 19
}
}

Authorizations

Authorization
string
header
required

An Isaacus-issued API key passed as a bearer token via the Authorization header in the format Authorization: Bearer YOUR_API_KEY.

Body

application/json

A request to classify the relevance of legal documents to a query with an Isaacus universal legal AI classifier.

Response

200
application/json

The documents have been successfully classified.

Classifications of the relevance of legal documents to a query produced by an Isaacus universal legal AI classifier.