Classifier API
Use AI-powered classification to automatically route documents to the correct processing pipeline. The classifier analyzes your document and determines which extraction schema should be used for optimal data extraction.
How Classification Works
Create Classifier in Platform
Set up a classifier and configure which deployments it should route to based on document type
Get Upload URL
Request a signed URL for uploading your document that needs to be classified
Upload and Classify Document
Upload your file, then send it for classification. AI analyzes the document and determines the best extraction schema
Process with Optimal Schema
Use the returned fileId and extractionSchemaId to process the document with the optimal configuration
Request Parameters
classifierId
stringThe unique identifier of the classifier you created in the platform. You can find this ID in your classifier settings.
unclassifiedFileId
stringThe unclassified file ID returned from the classifier get-url endpoint after uploading your document.
Authorization
stringBearer token for authentication.
Content-Type
stringMust be set to application/json
Response
When the document is successfully classified and routed to a deployment.
Response Fields
fileId
The classified file ID. Use this with the process-file endpoint to extract data.
deploymentName
Human-readable name of the deployment the document was routed to.
extractionSchemaId
The extraction schema ID to use for processing. Use this with the process-file endpoint.
When the document cannot be classified into any of the configured deployment routes.
Document Not Classified
The document doesn't match any of the configured deployment routes. You may need to add more deployment options to your classifier or process the document manually.
Common error responses you might encounter.
Complete Classification Workflow
Next Steps
Use the fileId and extractionSchemaId from classification results to extract structured data using the async process-file endpoint for scalable processing.
POST /api/v1/document/{extractionSchemaId}/process-file-async/{fileId}
Start the classification workflow by getting an upload URL for your documents.
Get Classifier Upload URL →