Jobs & Errors
Document AI jobs are asynchronous. You submit a job, wait for it to finish, then fetch the output. The same three steps apply to Digitise, Extract, Split, and Classify.
Submit
Call digitise(), extract(), split(), or classify(). One call creates and submits the job, and returns a job_id with an initial status.
Fetch
Call get_results() for structured data, or get_download_url() for the output file (Digitise and Extract only). See Fetch the output.
Job states
Split and Classify jobs report accepted when created and completed when finished. Their status includes type (split or classify), phase, and progress, and usage has pages_processed and pages_source.
Terminal states are completed, partially_completed, failed, and rejected.
Status response
Fetch the output
Each operation returns its output through a different call:
Calling either before the job reaches a terminal state returns 409.
What to do in each terminal state
Poll every few seconds (the examples use 5) and read usage in the status response to show progress on long documents.
Error Handling
Error Handling Code Example
Error Codes
The full error-code table, retry guidance, and SDK exception reference live on the central Errors & Troubleshooting page. Errors specific to this API: