---
site_search: "GET /ask?q={query} (read-only search over extend.ai and docs.extend.ai; returns links and quoted passages, not generated answers)"
title: "Classify API: Document Classification for Routing | Extend"
description: "Classify documents into your own categories with a confidence score and reasoning, then route each one to the right pipeline. Standard mode is 0.5 credits per page."
canonical: https://www.extend.ai/classify
---

# Classify API: Document Classification for Routing | Extend

> Search this site and the docs: [`/ask?q=…`](/ask?q=webhook+retries) returns matching pages from extend.ai and docs.extend.ai, with quoted passages.

Classify API

## Sort every document into the right pipeline

Your categories and descriptions define the labels; Classify assigns exactly one to each document and returns a confidence score and its reasoning.

[Try for free](https://dashboard.extend.ai/) · [Book a demo](https://www.extend.ai/get-started)

## What it does

### One label per document

Each run returns the matched category, a confidence score from 0 to 1, and insights explaining the choice.

### Rules for look-alike types

Classification rules give plain-language guidance for telling similar document types apart.

### Files or raw text

Classify a file by URL or ID, or send raw text when you already have it.

## Under the hood

Classify documents into pre-defined categories.

### Optimized for cost

Deploy fast and cheap classification at scale with purpose-built classifiers, without compromising on accuracy.

### Memory

Multimodal retrieval system that learns from past examples to handle edge cases where prompting falls short.

### Real time classification

Toggle low-latency classification to give instant feedback to your users.

## How to get started

### 1. Create an account

Sign up at dashboard.extend.ai. New accounts get 10,000 free credits.

Copy an API key from the Developers page and export it as EXTEND_API_KEY.

[Sign up](https://dashboard.extend.ai/) · [Developers page](https://dashboard.extend.ai/developers)

### 2. Choose how to call Classify

Studio: try Classify in the browser with no code.

MCP: connect Claude, Cursor, or any MCP client to https://mcp.extend.ai/mcp.

CLI: install with curl -fsSL https://extend.ai/install.sh | sh, then run extend setup.

SDKs: pip install extend-ai or npm install extend-ai; Java and Go SDKs are also available.

[Open Studio](https://dashboard.extend.ai/studio) · [MCP setup](https://www.extend.ai/agents/mcp.md) · [CLI setup](https://www.extend.ai/agents/cli.md) · [SDK docs](https://docs.extend.ai/sdks)

### 3. Process your first document

Define your categories. At least one must be other, so unknown documents have somewhere to go.

```bash
curl -X POST https://api.extend.ai/classify \
  -H "Authorization: Bearer $EXTEND_API_KEY" \
  -H "x-extend-api-version: 2026-02-09" \
  -H "Content-Type: application/json" \
  -d '{ "file": { "url": "https://extend-public-files.s3.us-east-2.amazonaws.com/freight-invoice.pdf" }, "config": { "classifications": [ { "id": "invoice", "type": "invoice", "description": "An invoice or bill requesting payment." }, { "id": "other", "type": "other", "description": "Any other document type." } ] } }'
```

### 4. Move to production

Send production traffic to POST /classify_runs; the synchronous POST /classify times out after 5 minutes.

[Classify File API reference](https://docs.extend.ai/api-reference/endpoints/classify/classify-file)

## Pricing

0.5 credits per page, with no separate parse charge.

[See full pricing](https://www.extend.ai/pricing.md)

## Documentation

- [Classification overview](https://docs.extend.ai/classification/overview)
- [Classify File API reference](https://docs.extend.ai/api-reference/endpoints/classify/classify-file)
- [Evaluation overview](https://docs.extend.ai/evaluation/overview)

## Related reading

- [Nuvocargo case study](https://www.extend.ai/resources/nuvocargo-case-study.md)
- [Checkr case study](https://www.extend.ai/resources/checkr-case-study.md)

## Use cases

### Freight document intake

Identify bills of lading, invoices, and customs forms as they arrive.

[Nuvocargo case study](https://www.extend.ai/resources/nuvocargo-case-study.md)

### Background screening

Sort screening documents by type before extraction and review.

[Checkr case study](https://www.extend.ai/resources/checkr-case-study.md)

### Mailroom & inbox routing

Label every incoming PDF so it reaches the right pipeline.

[Classification docs](https://docs.extend.ai/classification/overview)

### Healthcare intake

Tell referrals, prior authorizations, and lab results apart at intake.

[Healthcare](https://www.extend.ai/healthcare.md)

### Lending & KYC documents

Sort IDs, statements, and tax forms in an application packet.

[Financial services](https://www.extend.ai/financial-services.md)

### New document types

Handle a new document type from a handful of labeled examples.

[Try it in Studio](https://dashboard.extend.ai/studio)

## More products

- [Parse](https://www.extend.ai/parse.md)
- [Extract](https://www.extend.ai/extract.md)
- [Split](https://www.extend.ai/split.md)
- [Verify](https://www.extend.ai/verify.md)
- [Edit](https://www.extend.ai/edit.md)
