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.
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
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.
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.
Process your first document
Define your categories. At least one must be other, so unknown documents have somewhere to go.
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." } ] } }'Move to production
Send production traffic to POST /classify_runs; the synchronous POST /classify times out after 5 minutes.
Related reading
Use cases
- Nuvocargo case study
Freight document intake
Identify bills of lading, invoices, and customs forms as they arrive.
- Checkr case study
Background screening
Sort screening documents by type before extraction and review.
- Classification docs
Mailroom & inbox routing
Label every incoming PDF so it reaches the right pipeline.
- Healthcare
Healthcare intake
Tell referrals, prior authorizations, and lab results apart at intake.
- Financial services
Lending & KYC documents
Sort IDs, statements, and tax forms in an application packet.
- Try it in Studio
New document types
Handle a new document type from a handful of labeled examples.
