Skip to content
Documentation/Guides & tools

Work with documents

Upload, extract, and retain the source location behind each piece of evidence.

Markdown

Choose the next operation

  1. Upload a file and retain its asset ID.
  2. Extract text for reading, or extract anchored chunks for retrieval.
  3. Check extraction state, code, and lost before using the content.
  4. Use source preview or batch quote matching to inspect cited evidence.

For numbers, use analyze document figures. For a question over text, send extracted text to Ask a document, then poll its result.

Check extraction coverage

state is complete, partial, unsupported, or error. A partial result can contain useful content and missing sections at the same time. complete: false and lost identify incomplete recovery when present.

Branch on code, not on free-form reason:

  • source_too_large: send a smaller file.
  • source_encrypted: provide an unlocked copy.
  • source_corrupt: re-export the document.
  • unsupported_format: convert to a supported format.
  • ocr_unavailable: provide a text-layer document or use an OCR-enabled environment.
  • partial_extraction: inspect the missing parts.
  • empty_source: the source was read but held no content.
  • extraction_error: extraction failed; inspect the error before a bounded retry.

Retain source identity

Keep asset IDs, page/sheet/cell anchors, and any source_version_id, representation_id, and source_unit_id returned by the workflow. A mutable filename or URL is not an immutable source reference.

V2 numeric verification and OCR preparation require existing retained-source identities. The public upload response does not guarantee that it supplies those identities. Do not invent IDs to bridge that gap.