Skip to main content
API v3 is available. The SDKs below target the v2 API, which keeps working through its deprecation window. New SDK majors targeting v3 are in progress — see the v3 SDKs page and the v3 API reference.
anyformat ships hand-written client libraries for TypeScript and Python. Both expose the same fluent builder over the typed-graph workflow definition, so the only thing that differs across languages is the syntax.

TypeScript

@anyformat/sdk

Official TypeScript / Node client library — npm install @anyformat/sdk (Node 18+).
import { Anyformat, Schema } from "@anyformat/sdk";

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

const result = await af
  .workflow("Invoice", "Extract invoice header and totals")
  .parse()
  .extract([Schema.string("vendor", "Vendor name on the invoice")])
  .run(file)
  .wait();

console.log(result.field("vendor")?.value);
See the TypeScript SDK guide for builder methods, error handling, and the full surface.

Python

anyformat

Official Python client library — pip install anyformat (Python 3.13; pin expected to loosen before launch).
from anyformat.sdk import Client
from anyformat.workflow import Schema

client = Client(api_key="af_...")  # or read ANYFORMAT_API_KEY from env

workflow = (
    client.workflow("Invoices")
    .parse()
    .extract([Schema.string("vendor", "Vendor name on the invoice")])
    .create()
)

result = workflow.run("invoice.pdf").wait()
print(result.fields["vendor"].value)
See the Python SDK guide for builder methods, async usage, error handling, and the full surface.

Coding assistant

If you use Claude Code (or any compatible AI coding agent), install the anyformat Claude Code skill so your agent knows the right endpoints, payloads, and gotchas out of the box.
npx @anyformat/skill            # installs for all projects (~/.claude/skills/anyformat)
npx @anyformat/skill --project  # installs for the current project only (./.claude/skills/anyformat)
See the Coding assistant guide for installation, configuration, and example prompts.