Skip to main content
okra extract uploads, processes, and extracts structured data from a PDF in one step. The source can be a local file path, a URL, or the document ID of a PDF you already uploaded.

Structured extraction with a schema

Pass a JSON Schema to get structured JSON back. The schema can be a file path or inline JSON.
When stdout is not a TTY (or with --json), the result comes back in the standard envelope:

Per-field citations (--cite)

Add --cite to attach per-field source citations — the page and bounding box each extracted value came from. Grounding is opt-in: without --cite you get values only.
Citations are returned in the Anthropic-shaped citations array (type: page_location, with the source page, bbox, and the schema field each value maps to), alongside the extracted data.

Fire-and-forget (--no-wait)

By default okra extract waits for processing to finish. Use --no-wait to queue the work and return immediately; follow up with okra jobs wait.

Flags

Global flags (--json, --quiet, --output) apply as well — see the CLI Reference.
To browse a document’s text, tables, and structure after extraction, use the grounded context commands (okra context structure, okra context tables, okra context get) or read raw markdown with okra read <docId>.