Skip to main content
Most extraction integrations follow a three-step pattern: upload the file, start a run, then poll until results are ready. This decouples ingestion from processing so your system doesn’t have to block on a long-running AI call.

Sync vs async — which to use?

Synchronous (/extract)

One HTTP call. Blocks until done, returns the result directly. Best for interactive integrations, small files, or when you need the result immediately. Use when processing typically completes in under 60 seconds.

Async (3-step)

Upload, start, poll. Each step returns immediately. Best for large files, batch workloads, or when you want to decouple ingestion from processing.

The three steps

1

Upload the file

POST /projects/{project_name}/tables/{table_id}/filesSend the file along with its metadata. This creates a row in the extraction table associated with the file but does not start processing.Returns: { "row_id": "uuid" } — hold onto this.
2

Start a run

POST /projects/{project_name}/tables/{table_id}/runPass the row_id from step 1. This enqueues the AI job and returns immediately.Returns: { "run_id": "uuid" } — use this to poll.Optional: pass "zero_retention": true to run without persisting intermediate results.
3

Poll for results

GET /projects/{project_name}/tables/{table_id}/run/{run_id}Poll until status is done or error. A typical poll interval is 2–5 seconds.Returns a DataRow with the current status and, when done, the extracted data.

Run status values

Full example

File type options

The file_type field controls how Cloudsquid reads the file value:

Prefer one call? Use synchronous extraction

The /extract endpoint blocks until done and returns results in a single response.