Documentation menu

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.

  1. Received received

    We have your file and it is waiting in the queue.

  2. Fetching fetching

    For a URL upload, we download the file. Skipped for uploads.

  3. Reading analyzing

    Our OCR reads every word on every page, in order, and finds the tables, labelled fields and pictures.

  4. Taking pictures rendering

    We cut out each chart, diagram or photo, and take a picture of every scanned or picture-heavy page. Then the original file is deleted.

  5. Checking credit reserving

    Now that we know how big the job really is, we top up the hold on your credit to match.

  6. Understanding extracting

    Only if you sent an extraction or queries: 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.

  7. Making vectors embedding

    Only if you asked for embeddings: each page becomes a list of numbers for search.

  8. Finishing finalizing

    We charge what it actually cost and release the rest of the hold.

  9. Done done

    status is completed. 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.