Skip to main content
Execute a flow to process a document. This is the primary endpoint for document extraction.

Endpoint

Authentication

Requires an API key with flows:execute scope.

Path Parameters

Request Body

Request Fields

Response

Async Response (200 OK)

When wait: false (default), returns immediately with execution ID:
Poll GET /runs/ to check status and retrieve results.

Sync Response (200 OK)

When wait: true, waits for completion (up to timeout):

Response Fields

Examples

Basic Async Execution

Sync Execution

With Webhook

TypeScript

With Idempotency

Errors

Sync vs Async

For documents over 10 pages or complex flows, async execution with webhooks is recommended.

Next Steps

Get Execution

Poll for async results

Webhooks

Set up webhook handlers