For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog in
DocumentationAPI ReferenceModel VersioningChangelog
DocumentationAPI ReferenceModel VersioningChangelog
    • Studio
    • Support
    • Benchmarks
    • Status
  • Getting Started
    • Overview
    • API Quickstart
    • Dashboard Quickstart
    • Agent Quickstart
  • Dev Tools
    • SDKs
    • CLI
  • Capabilities
      • Overview
      • Configuration
      • Response Format
LogoLogo
Book a demoLog in
On this page
  • Response structure
  • Top-level fields
  • The classification output
  • Confidence
  • Insights
CapabilitiesClassification

Response Format

Was this page helpful?
Previous

Overview

Next
Built with

Classify returns the single best-matching category for a document, along with a confidence score and the reasoning behind the decision. This page explains every field in the response.


Response structure

A completed classify run looks like this (truncated for brevity). The classification result lives in output.

1{
2 "object": "classify_run",
3 "id": "clr_Xj8mK2pL9nR4vT7qY5wZ",
4 "file": {
5 "object": "file",
6 "id": "file_xK9mLPqRtN3vS8wF5hB2cQ",
7 "name": "freight_invoice.pdf"
8 },
9 "status": "PROCESSED",
10 "output": {
11 "id": "invoice",
12 "type": "invoice",
13 "confidence": 0.97,
14 "insights": [
15 {
16 "type": "reasoning",
17 "content": "The document is titled \"Freight Invoice\" and lists line items, amounts, and payment terms."
18 }
19 ]
20 },
21 "reviewed": false,
22 "edited": false,
23 "usage": { "credits": 9 }
24}

Top-level fields

FieldTypeDescription
objectstringAlways "classify_run".
idstringUnique identifier for the run (e.g. clr_...). Use it to fetch results later.
fileobjectThe processed file (id, name). Reusable as input to other endpoints.
statusstringPENDING, PROCESSING, PROCESSED, FAILED, or CANCELLED.
outputobject | nullThe classification result. Present when status is PROCESSED. See The classification output.
reviewed / editedbooleanWhether a human reviewed the run, and whether they changed the result. When reviewed is true, initialOutput and reviewedOutput are also populated.
classifier / classifierVersionobject | nullThe classifier and version used for the run. Present when a classifier reference was provided; not present when using inline config.
configobjectThe full configuration used, including defaults that were applied.
parseRunIdstring | nullThe ID of the parse run used for this classify run.
dashboardUrlstringLink to view the run in the Extend dashboard.
usageobjectCredits consumed (usage.credits).
failureReason / failureMessagestring | nullMachine-readable code and human-readable message. Present when status is FAILED.

The classification output

output holds a single matched classification. It is present when status is "PROCESSED".

1{
2 "id": "invoice",
3 "type": "invoice",
4 "confidence": 0.95,
5 "insights": [
6 {
7 "type": "reasoning",
8 "content": "Document contains itemized charges and payment terms."
9 }
10 ]
11}
FieldTypeDescription
idstringThe unique identifier of the matched classification, as defined in your classifications.
typestringThe type of the matched classification.
confidencenumberA value between 0 and 1 indicating the model’s confidence in the classification, where 1 represents maximum confidence.
insightsarrayAdditional insights about the classification decision. See Insights.

Confidence

confidence is a number from 0 to 1 reflecting how sure the model is about the match. Use it to gate downstream processing — for example, route any classification below a threshold to manual review.

Insights

insights is an array explaining the classification decision. Each insight has a type and content.

1{
2 "insights": [
3 {
4 "type": "reasoning",
5 "content": "This was classified as an invoice because it contains standard invoice elements including an invoice number, billing details, and itemized charges."
6 }
7 ]
8}
FieldTypeDescription
typestringThe type of insight. Always "reasoning" for now.
contentstringThe content of the reasoning insight.