> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyformat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Parse-only workflow

> Turn a document into markdown and layout blocks on the Flash, Fast, Standard or Agentic tier, with no extraction

**Nodes used:** [Parse](/guides/nodes/parse)

A parse-only workflow is one Parse node and no edges. It returns the document as markdown plus one block per region, each with a position and a confidence, and runs no extraction. Use it to preview a document before you write fields, to feed your own LLM or search index, or to see how a document reads.

<Tip>
  To parse one document on the Fast tier without creating a workflow, call [`POST /v3/parse/`](/api-reference-v3/parse/parse) (or [`POST /v3/parse/from-url/`](/api-reference-v3/parse/parse-from-url)) with the file. It runs against a parse workflow that anyformat keeps for your organization and returns a run you poll like any other.
</Tip>

## The graph

<CodeGroup>
  ```json Graph theme={null}
  {
    "name": "Document parser",
    "nodes": [{ "id": "parse_1", "type": "parse", "mode": "standard" }],
    "edges": []
  }
  ```

  ```python Python theme={null}
  import os
  from anyformat.sdk import Client

  client = Client(api_key=os.environ["ANYFORMAT_API_KEY"])

  workflow = client.workflow("Document parser").parse(mode="standard").create()
  ```

  ```typescript TypeScript theme={null}
  import { Anyformat } from "@anyformat/sdk";

  const af = new Anyformat({ apiKey: process.env.ANYFORMAT_API_KEY! });

  const workflow = await af.workflow("Document parser").parse({ mode: "standard" }).create();
  ```
</CodeGroup>

`mode` selects the tier. Nothing else in the graph changes.

## Pick a tier

Each row is what came back for the same one-page invoice.

| Tier         | `mode`     | What runs                                                                                                              | What you get back                                                                                                                                 |
| ------------ | ---------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Flash**    | `flash`    | The PDF's own text layer plus layout grounding. No model call. A page without a text layer is OCR'd (`scanned_pages`). | Plain text per block, tables as markdown pipe tables, `parse_confidence` of 100 on a born-digital PDF. Done in about 12 s.                        |
| **Fast**     | `lite`     | One OCR pass, no LLM correction.                                                                                       | One block per text line, tables as bare HTML `<table>`, `parse_confidence` and `layout_confidence` are `null`. Done in about 14 s.                |
| **Standard** | `standard` | Page-by-page parsing with reading-order correction. The default.                                                       | Merged blocks with headings marked, HTML tables with a `data-cell-id` per cell, `parse_confidence` of 89. Done in about 28 s.                     |
| **Agentic**  | `agentic`  | Adaptive, multi-step parsing that works hardest on dense tables. `effort` sets the preset.                             | The Standard shape, with the most work spent on tables. Done in about 37 s. See [Agentic parse to markdown](/examples/agentic-parse-to-markdown). |

Start on Standard. Move a document type down to Fast or Flash when its output holds up, and up to Agentic only where Standard falls short. The [Parse node](/guides/nodes/parse) page lists the credits per page for each tier.

## Run and read

<CodeGroup>
  ```bash curl theme={null}
  # Upload one file and start a run
  curl -X POST "https://api.anyformat.ai/v3/workflows/$WORKFLOW_ID/upload/run/" \
    -H "Authorization: Bearer $ANYFORMAT_API_KEY" \
    -F 'files=@document.pdf'
  # -> 202 {"run_id": "...", "document_packet_id": "...", "status": "queued"}

  # Read the run. Repeat until "status" is "processed".
  curl "https://api.anyformat.ai/v3/runs/$RUN_ID/" \
    -H "Authorization: Bearer $ANYFORMAT_API_KEY"
  ```

  ```python Python theme={null}
  result = workflow.run("document.pdf").wait()

  print(result.parse.parse_confidence)
  print(result.parse.markdown[:500])
  for block in result.parse.blocks:
      print(block.id, block.type, block.page, block.parse_confidence)
  ```

  ```typescript TypeScript theme={null}
  import { readFile } from "node:fs/promises";

  const file = new File([await readFile("document.pdf")], "document.pdf", { type: "application/pdf" });
  const run = await workflow.run(file);
  const result = await run.wait();

  console.log(result.parse?.parseConfidence);
  console.log(result.parse?.markdown?.slice(0, 500));
  for (const block of result.parse?.blocks ?? []) {
    console.log(block.id, block.type, block.page, block.parse_confidence);
  }
  ```
</CodeGroup>

## What comes back

The Standard tier on a one-page invoice, trimmed. `extractions` is empty because no Extract node ran.

```json theme={null}
{
  "id": "06a8d903-5ca9-79d9-8000-4dec88414c03",
  "status": "processed",
  "results": {
    "document_packet_id": "06a8d903-5a6d-796e-8000-770ffb2d85c5",
    "verification_url": "https://app.anyformat.ai/workflows/.../files/...",
    "parse": {
      "markdown": "<a id=\"p1_b0\"></a>\n\n# INVOICE\n\n<a id=\"p1_b1\"></a>\n\nInvoice #: INV-2026-9001 Issue date: 2026-02-20 ...\n\n<a id=\"p1_b5\"></a>\n\n<table>\n<thead>\n<tr>\n<th data-cell-id=\"r0c0\">Description</th> ...",
      "text": "INVOICE\nInvoice #: INV-2026-9001 Issue date: 2026-02-20 ...",
      "parse_confidence": 89.1,
      "layout_confidence": 0.7,
      "blocks": [
        {
          "id": "p1_b0",
          "type": "title",
          "page": 1,
          "bbox": { "x0": 0.115, "y0": 0.066, "x1": 0.269, "y1": 0.096 },
          "layout_confidence": 0.846,
          "parse_confidence": 100.0,
          "content": "# INVOICE",
          "hyperlinks": [],
          "rows": null,
          "image_base64": null
        },
        {
          "id": "p1_b5",
          "type": "table",
          "page": 1,
          "bbox": { "x0": 0.114, "y0": 0.317, "x1": 0.885, "y1": 0.409 },
          "layout_confidence": 0.697,
          "parse_confidence": 85.9,
          "content": "<table>...</table>",
          "hyperlinks": [],
          "rows": [
            [{ "cell_id": "r0c0", "text": "Description" }, { "cell_id": "r0c1", "text": "Qty" }],
            [{ "cell_id": "r1c0", "text": "Matrix Extensible Action-Items" }, { "cell_id": "r1c1", "text": "8" }]
          ]
        }
      ]
    },
    "classifications": [],
    "splits": [],
    "extractions": [],
    "edits": []
  }
}
```

* Each `<a id="p1_b0">` anchor in `markdown` names the block with the same `id` in `blocks`. That is how you map a passage back to its `bbox` (page fractions, 0 to 1) and its confidences: `parse_confidence` is 0 to 100, `layout_confidence` is 0 to 1.
* A `table` block also carries `rows`, the cells as a grid, so you do not have to parse the HTML.
* Block ids carry the page: `p2_b0` is the first block on page 2. Every page is parsed.

## Tips

* Create one parse-only workflow and send every document to it. There is no reason to create one per document type.
* Gate on `parse_confidence`. It is `null` on the Fast tier, which makes no model call, so fall back to a per-tier rule there.
* For a folder of born-digital PDFs, Flash is the cheapest and fastest tier. A scanned page inside it is OCR'd by default; set `scanned_pages` to `skip` or `fail` if you would rather know.
* The parse result is cached per file and tier. Send the same file again and the parse is reused; pass `"cache": false` on the node to force a fresh parse.

## Next steps

<CardGroup cols={2}>
  <Card title="Parse node" icon="file-lines" href="/guides/nodes/parse">
    Every knob on the node, and the credits per tier
  </Card>

  <Card title="Agentic parse to markdown" icon="wand-magic-sparkles" href="/examples/agentic-parse-to-markdown">
    The Agentic tier and its effort presets
  </Card>

  <Card title="Get run" icon="reply" href="/api-reference-v3/runs/get">
    The full run envelope
  </Card>

  <Card title="Quickstart" icon="route" href="/guides/quickstart">
    Add an Extract node and get fields back
  </Card>
</CardGroup>
