Configuring a Classifier

Classification Processor Configuration

“Classifiers” categorize documents into predefined types. These can be configured via either the UI or the API.

Example API Usecases

Webhooks

You can consume classification outputs via webhooks, track updates to your classifier, and more. See Webhook Events for details.

Configurable Fields

You can view full details of the ClassificationConfig in our API reference.

When working with the ClassificationConfig, you can configure several key aspects, such as:

  • Prompts - Custom instructions that guide how the classifier categorizes documents
  • Classifications - Define the categories and rules for document classification
  • Classifier version - Specify which version of the classification model to use
  • Advanced options - Configure context limits, multimodal processing, page ranges, and other specialized settings

Classifier Configuration Example

1const classificationConfig = {
2 type: "CLASSIFY",
3 classifications: [
4 {
5 id: "invoice",
6 type: "INVOICE",
7 description: "Standard invoice document ...",
8 },
9 {
10 id: "bill_of_lading",
11 type: "BILL_OF_LADING",
12 description: "Bill of Lading document ...",
13 },
14 ],
15 classificationRules: "- If ...", // Optional custom rules
16};