Skip to main content
Every Retab endpoint is available through a typed client library. The SDKs are open-source under retab-dev/retab.

Install

Authenticate

Each SDK reads RETAB_API_KEY from the environment by default. Get a key from the dashboard settings. Use RETAB_API_KEY=rt_test_... for development and CI, and RETAB_API_KEY=rt_live_... for production. The key prefix selects the customer environmentRETAB_BASE_URL is the Retab deployment URL, not the environment selector. Legacy sk_retab_... keys still work and resolve to production.
For a worked end-to-end extraction, see the quickstart in the introduction. Full method signatures live under API Reference.

Workflow Graph Resources

Blocks and edges are flat workflow resources keyed by workflow_id. SDK calls take the workflow id explicitly instead of nesting graph resources under a /workflows/{workflow_id}/... path. When creating or updating workflow blocks with a json_schema config, the public API treats the schema structurally. JSON object property order is not preserved as authored display order; the dashboard may preserve authored order through internal editor state.

Workflow Reviews

Reviews use immutable versions. To submit a corrected output, create a new version under client.workflows.reviews.versions and pass the reviewed parent_id/parentVersionId; SDK-created versions are always corrections of an existing version.

Workflow Eval and Experiment Runs

Workflow runs, workflow-eval runs, and experiment runs all use the same run-id-first pattern in the SDKs: create a run from the parent resource, poll the run by its id, then inspect child records under that run.
These surfaces do not expose public job_id or batch_id handles. Use the returned run id for polling, cancellation, results, and experiment metrics.