> ## Documentation Index
> Fetch the complete documentation index at: https://docs.extend.ai/llms.txt
> Use this file to discover all available pages before exploring further.
>
> ## API version
> The current API version is `2026-02-09`, served at the site root (no version prefix in URLs).
> If this page URL contains `/2025-04-21/` or `/2024-12-23/`, you are reading an older API version.
> Prefer the current docs at https://docs.extend.ai/llms.txt unless the user explicitly needs that older version.
> Do not treat older-version pages as the source of truth for new integrations.

# Classification Response Format

> Understand the classify run: top-level fields, the matched classification, confidence, and reasoning insights.

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`.

```json
{
  "object": "classify_run",
  "id": "clr_Xj8mK2pL9nR4vT7qY5wZ",
  "file": {
    "object": "file",
    "id": "file_xK9mLPqRtN3vS8wF5hB2cQ",
    "name": "freight_invoice.pdf"
  },
  "status": "PROCESSED",
  "output": {
    "id": "invoice",
    "type": "invoice",
    "confidence": 0.97,
    "insights": [
      {
        "type": "reasoning",
        "content": "The document is titled \"Freight Invoice\" and lists line items, amounts, and payment terms."
      }
    ]
  },
  "reviewed": false,
  "edited": false,
  "usage": { "credits": 9 }
}
```

### Top-level fields

| Field                              | Type           | Description                                                                                                                                                |
| ---------------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `object`                           | string         | Always `"classify_run"`.                                                                                                                                   |
| `id`                               | string         | Unique identifier for the run (e.g. `clr_...`). Use it to [fetch results](/api-reference/endpoints/classify/get-classify-run) later.                       |
| `file`                             | object         | The processed file (`id`, `name`). Reusable as input to other endpoints.                                                                                   |
| `status`                           | string         | `PENDING`, `PROCESSING`, `PROCESSED`, `FAILED`, or `CANCELLED`.                                                                                            |
| `output`                           | object \| null | The classification result. Present when `status` is `PROCESSED`. See [The classification output](#the-classification-output).                              |
| `reviewed` / `edited`              | boolean        | Whether a human reviewed the run, and whether they changed the result. When `reviewed` is `true`, `initialOutput` and `reviewedOutput` are also populated. |
| `classifier` / `classifierVersion` | object \| null | The classifier and version used for the run. Present when a classifier reference was provided; not present when using inline `config`.                     |
| `config`                           | object         | The full configuration used, including defaults that were applied.                                                                                         |
| `parseRunId`                       | string \| null | The ID of the parse run used for this classify run.                                                                                                        |
| `dashboardUrl`                     | string         | Link to view the run in the Extend dashboard.                                                                                                              |
| `usage`                            | object         | Credits consumed (`usage.credits`).                                                                                                                        |
| `failureReason` / `failureMessage` | string \| null | Machine-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"`.

```json
{
  "id": "invoice",
  "type": "invoice",
  "confidence": 0.95,
  "insights": [
    {
      "type": "reasoning",
      "content": "Document contains itemized charges and payment terms."
    }
  ]
}
```

| Field        | Type   | Description                                                                                                                   |
| ------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------- |
| `id`         | string | The unique identifier of the matched classification, as defined in your `classifications`.                                    |
| `type`       | string | The type of the matched classification.                                                                                       |
| `confidence` | number | A value between `0` and `1` indicating the model's confidence in the classification, where `1` represents maximum confidence. |
| `insights`   | array  | Additional insights about the classification decision. See [Insights](#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`.

```json
{
  "insights": [
    {
      "type": "reasoning",
      "content": "This was classified as an invoice because it contains standard invoice elements including an invoice number, billing details, and itemized charges."
    }
  ]
}
```

| Field     | Type   | Description                                        |
| --------- | ------ | -------------------------------------------------- |
| `type`    | string | The type of insight. Always `"reasoning"` for now. |
| `content` | string | The content of the reasoning insight.              |