Classify asynchronously
Submit one document and retrieve the result later.
Last updated
Submit one document and retrieve the result later.
POST /classify queues a classification request.
Requires the X-Api-Key header.
Send application/json using ClassifyRequest.
content
string
Base64-encoded file content.
context
string
Additional context for classification.
custom_document_types
array
Restricts classification to these document types.
custom_document_types_url
string
URL to a JSON list of custom document types. Merges with custom_document_types.
entities
object
Entity ID-to-name mapping for Excel workbooks.
file_url
string
Public URL to the file.
metadata
object
Custom metadata.
model
string
Supported model: gpt-4.1, gpt-5.1, gemini-3, openrouter/z-ai/glm-5.2, or openrouter/deepseek/deepseek-v4-pro.
use_custom_types_only
boolean
Limits results to custom types. Requires custom types or their URL.
200
OK
ClassifyResponse
400
Bad Request
ValidationError
401
The API key is missing or invalid.
500
The request body is missing or invalid. Known defect.
Retrieve the completed result from Retrieve classification results.
Last updated
curl -X POST "https://<api-host>/classify" \
-H "X-Api-Key: $DOCAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_url": "https://example.com/unknown-document.pdf"
}'
