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.

Classify
  • 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.

  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.

  3. 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." } ] } }'
  4. Move to production

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

Pricing

0.5 credits per page, with no separate parse charge.

See full pricing

Use cases

  • Freight document intake

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

    Nuvocargo case study
  • Background screening

    Sort screening documents by type before extraction and review.

    Checkr case study
  • Mailroom & inbox routing

    Label every incoming PDF so it reaches the right pipeline.

    Classification docs
  • Healthcare intake

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

    Healthcare
  • Lending & KYC documents

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

    Financial services
  • New document types

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

    Try it in Studio
cta-background

( fig.11 )

Turn your documents into high quality data