Classify document
Classify a document into one of the provided categories using AI. The AI reads the first 3 pages of the document and picks the best matching category. Supports PDF, DOCX, ODT, and Markdown files. Cost: 6 credits per request.
Authorizations
Short-lived, Developer-API-audience token obtained by the trusted MCP service through token exchange (mcp_at_...). Raw MCP resource tokens are rejected.
Body
File ID of the document to classify (PDF, DOCX, ODT, or Markdown)
"550e8400-e29b-41d4-a716-446655440000"
Array of category names to classify the document into. The AI will pick the best matching category. Minimum 2, maximum 50 categories.
2 - 50 elementsOptional webhook configuration
Response
Classification job created
Job ID
"550e8400-e29b-41d4-a716-446655440000"
Action that was performed
"pdf.merge"
Current job status
PENDING, PROCESSING, COMPLETED, FAILED "PENDING"
Input file IDs used for this job
Output file ID (available when COMPLETED)
null
Error message (available when FAILED)
null
Job creation timestamp
Job start timestamp
Job completion timestamp
Structured job result data (e.g. OCR markdown/JSON, generated filename, PDF metadata, form fields). Available when the job produces a direct result instead of an output file.
Deprecated — use result instead. Additional metadata, duplicated from result for backward compatibility.
