Guides
The life of a document
Every status and stage a document passes through, and how to poll for the result.
In short:
ask poll_url
every second or two until status
is completed
(read result) or failed
(read error).
status
is the big picture: queued, processing, then completed, failed, or later expired.
stage
is the exact step, and goes through these in order. Steps with nothing to do are
skipped.
-
Received
receivedWe have your file and it is waiting in the queue.
-
Fetching
fetchingFor a URL upload, we download the file. Skipped for uploads.
-
Reading
analyzingOur OCR reads every word on every page, in order, and finds the tables, labelled fields and pictures.
-
Taking pictures
renderingWe cut out each chart, diagram or photo, and take a picture of every scanned or picture-heavy page. Then the original file is deleted.
-
Checking credit
reservingNow that we know how big the job really is, we top up the hold on your credit to match.
-
Understanding
extractingOnly if you sent an
extractionorqueries: the model reads the words and the pictures together, fills in your fields, answers your questions and notes the page and quote for every value. Otherwise the pages are simply saved. -
Making vectors
embeddingOnly if you asked for embeddings: each page becomes a list of numbers for search.
-
Finishing
finalizingWe charge what it actually cost and release the rest of the hold.
-
Done
donestatusiscompleted. Fetch the result.
Polling costs no credit, but each call counts towards your rate limit (and, on the free trial, its monthly request quota), so wait a second or two between calls. Every step saves its work before the next begins: if something hiccups and the job is retried, it carries on from where it was and you are not charged twice.