Skip to main content
Use the API to classify each page in a document by type. You provide a document and a list of classes, and the API assigns a class to each page. Use those classes to decide how to handle each page downstream, for example which pages to parse, how to split a batch, or which extraction schema to apply.
is in Preview. This feature is still in development and may not return accurate results. Do not use this feature in production environments.

Example Use Cases

  • Financial Services: Financial institutions receiving batches of mixed documents can classify pages to identify bank statements, utility bills, and identification documents before routing them to the appropriate processing pipeline.
  • Healthcare: Healthcare systems ingesting patient records can classify pages to identify intake forms, pathology reports, and medication lists before parsing or extraction.
  • Legal: Legal teams processing incoming documents can classify pages by section type (for example, cover page, terms, signature page) before routing each page to the appropriate review workflow.
  • Insurance: Insurance companies receiving claim submissions can classify pages to identify claim forms, invoices, and medical records before extraction.
For information about pricing and credits, go to Pricing & Billing.

Process Overview

Follow these steps to classify pages in a document:
  1. Define your class list by creating the classes that describe the page types in your document. Learn more about Classes.
  2. Classify your document using the API. Pass your document and class list. All pages are classified concurrently.
  3. Use the classification results in your downstream workflows. Route pages to Parse, Split, Extract, or other systems based on the class assigned to each page. Learn more about the response structure.

Classes

A class is an object with a required class name and an optional description. Include a description when the class name alone may be ambiguous (for example, "spec" vs "manual"). Omit it when the name is self-explanatory. You can mix classes with and without descriptions in the same request.

Classify with the API

Classify the pages in a document by calling the endpoint. This example classifies a document that may contain invoices, bank statements, and earnings statements. The invoice and bank_statement classes include descriptions; earnings statement does not.
curl -X POST 'https://api.va.landing.ai/v1/ade/classify' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'classes=[{"class":"invoice","description":"A commercial bill with line items, totals, and payment terms"},{"class":"bank_statement","description":"A monthly summary of account transactions"},{"class":"earnings statement"}]' \
  -F 'document=@document.pdf'

Parameters

Get the full parameters from the API reference.
ParameterRequiredDescription
documentRequired (choose one)The document file to classify.
document_urlRequired (choose one)A URL pointing to the document to classify.
classesRequiredA JSON array of class objects. Each object requires a class name and accepts an optional description. Pass as a JSON string in form data.
modelOptionalThe classification model version to use (for example, classify-20260420). Defaults to the latest version.

Supported File Types

The API supports all file types that Parse supports, except spreadsheets (CSV, XLSX), up to 200 MB. For the full list, see Supported File Types.

Use Classify with Our Libraries

Click one of the tiles below to learn how to use the API with our libraries.

Python Library

Use with our Python library.
https://mintcdn.com/landingaitest/9admv5znHgUFfVyj/images/ts-logo-512-green.svg?fit=max&auto=format&n=9admv5znHgUFfVyj&q=85&s=37d2005241bb43dec1aa8716782a7508

TypeScript Library

Use with our TypeScript library.

Share Your Feedback

is in public preview and we are actively looking for feedback to improve it. To share your experience, schedule a feedback session with us. Come prepared to discuss:
  • What is working well
  • Any challenges you’ve encountered and how the feature could improve
  • The email address for your account, found in your profile page
  • The documents you used
  • The code you used