v28

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

Universal classification

Classify documents with an Isaacus universal classification model.

post/classifications/universal

Request body

model'kanon-universal-classifier' required

The ID of the model to use for universal classification.

querystring required

The Isaacus Query Language (IQL) query or, if IQL is disabled, the statement, to evaluate the texts against.

The query must contain at least one non-whitespace character.

Unlike the texts being classified, the query cannot be so long that it exceeds the maximum input length of the universal classifier.

textsstring[] required

The texts to classify.

Each text must contain at least one non-whitespace character.

is_iqlboolean

Whether the query should be interpreted as an IQL query or else as a statement.

scoring_method'auto' | 'chunk_max' | 'chunk_avg' | 'chunk_min'

The method to use for producing an overall confidence score.

auto is the default scoring method and is recommended for most use cases. Currently, it is equivalent to chunk_max. In the future, it will automatically select the best method based on the model and inputs.

chunk_max uses the highest confidence score of all of the texts' chunks.

chunk_avg averages the confidence scores of all of the texts' chunks.

chunk_min uses the lowest confidence score of all of the texts' chunks.

Example request

{
  "model": "kanon-universal-classifier",
  "query": "This is a confidentiality clause.",
  "texts": [
    "I agree not to tell anyone about the document."
  ]
}

Response

Classifications of the relevance of documents to a query produced by an Isaacus universal classification model.

Example response

{
  "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
  }
}