Skip to main content

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.

The walkthrough below has tabs at each step — pick UI to drive everything from app.anyformat.ai, or curl / TypeScript / Python to drive the API directly. The four paths produce the same result.
Even if you plan to integrate via the API, we recommend building your first workflow in the UI. It’s faster to iterate on field definitions visually, and once it works you can copy the workflow ID and call it from code.
Python package + class names are provisional. pip install anyformat-sdk and from anyformat.sdk import Client work today, but both are expected to change before the official launch — pin the version you ship with.

Before you start

Create an account at app.anyformat.ai. That’s it.

1. Create a workflow

A workflow defines what data to extract. We’ll build a simple invoice processor with three fields: invoice_number, total_amount, issue_date.
  1. From the home screen, type a description of what you want to extract (e.g. “Invoice processing: extract invoice number, total, and issue date”).
  2. Drag in a sample invoice PDF (optional but recommended — anyformat will suggest fields from the document).
  3. Click Create.
anyformat opens the workflow workspace with the document on the left and the fields panel on the right. Review the suggested fields and adjust as needed.Once your fields look right, copy the workflow ID from the URL or workflow settings — you’ll need it if you want to run this workflow via the API later.
The same shape supports parse-only workflows (drop the extract node), classify-then-extract for mixed document types, and split workflows for multi-document files. See Create workflow for the full topology rules.

2. Run the workflow on a document

From the workflow workspace, drag in (or upload via the Add document button) the invoice you want to process. Processing starts automatically and usually completes in 10–60 seconds depending on the document.

3. Get the extracted data

Results appear in the workflow workspace as soon as processing finishes. Each extracted value is linked to its location in the document — click a field to highlight where it came from.Export the results as CSV, Excel, or JSON from the workflow view. See Outputs for the differences.
A completed result looks like this (one section per node type that ran — parse and extractions here; classifications and splits are empty because this workflow has neither):
{
  "collection_id": "069dcc2c-e14c-7606-8000-2ee4fb17b4e1",
  "verification_url": "https://app.anyformat.ai/workflows/.../files/...",
  "parse": { "markdown": "<DOCUMENT id=\"1\" page=\"1\">...", "text": "...", "parse_confidence": 94.2, "layout_confidence": 87.4, "blocks": [] },
  "classifications": [],
  "splits": [],
  "extractions": [
    {
      "split_name": null,
      "partition": null,
      "fields": {
        "invoice_number": {
          "value": "INV-2024-0847",
          "confidence": 97.0,
          "evidence": [{"text": "Invoice #INV-2024-0847", "page_number": 1}],
          "verification_status": "not_verified"
        },
        "total_amount": {
          "value": 4087.50,
          "confidence": 96.0,
          "evidence": [{"text": "Total: $4,087.50", "page_number": 2}],
          "verification_status": "not_verified"
        },
        "issue_date": {
          "value": "2024-03-15",
          "confidence": 93.0,
          "evidence": [{"text": "Date: March 15, 2024", "page_number": 1}],
          "verification_status": "not_verified"
        }
      }
    }
  ]
}
See Runs & results for the model behind these sections, and Response formats for every field in the envelope.

Complete script

The three steps above are narrative slices of the same script. Here they are end-to-end as a single pasteable block.
import { Anyformat, Schema } from "@anyformat/sdk";

const af = new Anyformat({ apiKey: process.env.ANYFORMAT_API_KEY! });
const file: File = /* a File with .name set, e.g. new File([bytes], "invoice.pdf") */;

const result = await af
  .workflow("Invoice Processing", "Extract key data from invoices")
  .parse()
  .extract([
    Schema.string("invoice_number", "The unique invoice identifier"),
    Schema.float("total_amount",    "Total invoice amount"),
    Schema.date("issue_date",       "Date when the invoice was issued"),
  ])
  .run(file)
  .wait();

console.log(result.field("invoice_number")?.value);
console.log(result.field("total_amount")?.value);
console.log(result.field("issue_date")?.value);

Where to go next

Build workflows

Deeper walkthrough of the Define → Refine → Publish lifecycle in the UI

Recipes

End-to-end examples — invoices, resumes, contracts, receipts, and more

Coding assistant

Let Claude Code build and run anyformat workflows from your editor

API reference

Every endpoint, every response, every error code