The Classify API accepts a config object that controls how a document is categorized. The only required field is classifications — the set of categories the classifier chooses from. The rest are optional: classificationRules for natural-language guidance, baseProcessor and baseVersion to pick the model, advancedOptions for context, multimodal processing, memory, and page ranges, and parseConfig to tune how the document is parsed first.
You can pass the same config inline on a one-off /classify call or save it to a reusable Classifier and reference that classifier by id. Either way the configuration is identical.
For default values and the full schema, see the Create Classify Run API reference.
Prefer a UI? Extend Studio lets you configure a classifier visually and export the config JSON.
classificationsType: array (required)
The categories the classifier can choose from. Provide at least one classification, and at least one classification must have the type "other" as a catch-all. Each classification must have a unique id.
Each entry has these fields:
classificationRulesType: string
Custom rules to guide the classification process in natural language. Useful for disambiguating categories that look alike or encoding business logic.
baseProcessorType: "classification_performance" | "classification_light" (default: "classification_performance")
The base classification model to use.
baseVersionType: string
The version of the classification_performance or classification_light processor to use. If not provided, the latest stable version for the selected baseProcessor is used automatically. See the Classification Changelog.
Configuration under advancedOptions.
advancedOptions.contextType: "default" | "max" (default: "default")
How much of the document to pass to the model as context.
default — passes in only a limited amount of the document, and you’re only charged for the pages passed in. Typically the whole document isn’t needed to classify it — only the first few pages — so this keeps costs down.max — passes in the full document. Use it when later pages are needed to tell categories apart.advancedOptions.advancedMultimodalEnabledType: boolean (default: true)
Enable advanced multimodal processing for better handling of visual elements during classification.
advancedOptions.memoryEnabledType: boolean (default: false)
Enable memory for enhanced processing by learning from past successful classifications. See Memory.
advancedOptions.pageRangesType: Array<{ start: number, end: number }>
Restrict classification to specific page ranges.
parseConfigType: object
Controls how the document is parsed before classification (target format, chunking, and block options). See Parse Configuration for the full set of options.
To reuse a configuration, create a classifier and reference it by id, optionally overriding specific fields per run with overrideConfig:
A classifier is a kind of processor — see that page for how saving a configuration lets you version, evaluate, and optimize it.
classifier.overrideConfig.With overrideConfig, only the fields you provide override the classifier’s saved configuration — for example, you can pass only classificationRules without providing classifications.