Documentation menu

Guides

What you get back

The result, its citations and the extras you can ask for, with a complete document response.

In short: result is what you asked the model for: result.data for an extraction, result.citations for where each part of it came from, and result.answers for your queries. Ask for neither and it is null.

A completed document, with every field. This one was sent with extraction.fields naming all seven built-in fields, and one question:

GET /documents/{id}
{
  "id": "8f1c2d3e-5b6a-4c1d-9e2f-0a1b2c3d4e5f",
  "object": "document",
  "status": "completed",
  "stage": "done",
  "mode": "live",
  "filename": "inv-1042.pdf",
  "content_type": "application/pdf",
  "byte_size": 184213,
  "source_url": null,
  "page_count": 2,
  "analysis": "layout",
  "model": {"requested": "auto", "used": "northdoc-swift-1"},
  "retention_seconds": 86400,
  "result": {
    "data": {
      "title": "Tax invoice INV-1042",
      "document_type": "invoice",
      "summary": "Harbour Office Supplies invoices Acme Robotics for four chairs and four lamps.",
      "dates": [{"label": "Due date", "date": "2026-10-31"}],
      "parties": [
        {"name": "Harbour Office Supplies Pty Ltd", "role": "supplier"},
        {"name": "Acme Robotics", "role": "customer"}
      ],
      "amounts": [{"label": "Total due", "amount": 1234.0, "currency": "AUD"}],
      "key_facts": ["GST of $112.18 is included"]
    },
    "citations": [
      {"path": "data.amounts[0].amount", "page": 2, "quote": "Total amount due $1,234.00", "confidence": 0.95}
    ],
    "answers": [
      {"question": "What is the total due?", "answer": "$1,234.00", "page": 2,
       "quote": "Total amount due $1,234.00", "not_found": false}
    ]
  },
  "error": null,
  "cost": {"estimated_micro": 110843, "settled_micro": 61275},
  "timings": {"analyzing_ms": 3120, "rendering_ms": 410, "reserving_ms": 12,
              "extracting_ms": 5870, "finalizing_ms": 25},
  "created_at": "2026-10-05T01:11:58Z",
  "started_at": "2026-10-05T01:11:58Z",
  "completed_at": "2026-10-05T01:12:09Z",
  "failed_at": null,
  "expires_at": "2026-10-06T01:12:09Z",
  "retrieved_at": "2026-10-05T01:12:11Z",
  "purged_at": null
}

result

null unless you sent an extraction or queries: with neither, no model runs, and the pages, pictures and vectors are the whole result.

result.data

What your extraction asked for: the built-in fields you named (title, document_type, summary, dates, parties, amounts, key_facts) and the properties of your schema. Anything the document does not show is left out, not guessed.

result.citations

The citations: for each value, the page it is on, the exact words it came from and how sure the model is.

result.answers

One per question you sent in queries, in order. not_found: true when the document does not say.

result.warnings

Only there when something is worth knowing, such as pictures left out of a very large document.

Citations

Every value in data has an entry in citations. path points at the value, page is the page it is on, and quote is the exact text it was read from, so you can find it, highlight it or show it to a person. When a value was read from a picture, the quote is the figure's caption or a short note of where it is on the page. confidence runs from 0 to 1: use a threshold to send unsure values to a person.

result.citations[0]
{
  "path": "data.amounts[0].amount",
  "page": 2,
  "quote": "Total amount due $1,234.00",
  "confidence": 0.95
}

Extras you can ask for

The result is kept small. Bigger extras are added with ?include= (comma-separated). include shows what was made; it cannot make it after the fact. Markdown and embeddings exist only if you switched them on, and tables and labelled fields only with layout analysis (the default).

include Where Needs What it is
text /documents/{id} nothing All the text the model read, each page under a === Page N === line.
markdown /documents/{id} markdown: true The document as markdown, headings and tables included.
pages /documents/{id} nothing One object per page: its text, word count and per-page result.
tables /pages, or /documents/{id} with pages layout analysis Each table on a page, as markdown with its size.
key_values /pages, or /documents/{id} with pages layout analysis Labelled fields the OCR found (like Invoice number: INV-1042) with confidence.
usage /documents/{id} nothing What this document and its questions cost, line by line.
options /documents/{id} nothing The options it was sent with.
layout /pages nothing Raw layout elements with where they sit on the page.
images /pages images (on) Each page's pictures, with page, caption, size, position and a download url.
image_data /pages images (on) The same, with each picture's bytes as base64 data: text, vectors and pictures in one call.
embeddings /pages embeddings Each page's vector. Only on the pages endpoint.

Every field is described on Get a document.