Job resource. Every
job-creating route accepts ?wait_seconds= to optionally block for a result.
Job states
Every job flows through these states:Sync vs async via wait_seconds
The ?wait_seconds= query parameter controls blocking on each job-creating route:
- Python
- TypeScript
- cURL
- 200 — Job reached a terminal state within
wait_seconds; full result is inline. - 202 — Timeout before completion; poll
GET /v1/jobs/{job_id}.
wait_seconds max is 300. It is always a query parameter, never a JSON body field.
Polling
- Python
- TypeScript
- cURL
Streaming job events
Subscribe to real-time status transitions instead of polling:- Python
- TypeScript
- cURL
text/event-stream (Server-Sent Events). Each event is a small status
update with sequence, at, status, and progress. It is not a full Job. The stream closes when the job reaches a terminal status.
Call GET /v1/jobs/{id} to read the full job, including its result or error.
Idempotency
Use theIdempotency-Key HTTP header to make job-creating requests replay-safe:
- Python
- TypeScript
- cURL
- First call — Starts a new job.
- Repeated calls with the same key — Returns the original job without starting a new one.
- The key is scoped per API key.
- The key is kept with the job for replay and is never cleared, also after the job’s content expires (see Data retention). Do not put personal data in an idempotency key. Use an opaque value such as a UUID or a hash of your own request id.
Idempotency-Key is always an HTTP header, never a JSON body field.
Use for:
- Retrying after a network failure (the same job is returned)
- CI/CD pipelines (re-running a step is safe)
Listing jobs
- Python
- TypeScript
- cURL
?cursor=<next_cursor> to retrieve the next page. Optional filters: ?status=succeeded, ?kind=parse.
Cancellation
- Python
- TypeScript
- cURL
- Queued or running — Job is marked
cancelled. - Already terminal — Refused with
409job_not_cancellable. The job is unchanged; read it withGET /v1/jobs/{id}.
credits are 0. Results already delivered before the cancel are billed: a progressive classify or extract that published labels or values bills those units. A cancelled job returns no results. GET /v1/jobs/{id} still
returns the job, with result: null and result_state: "cancelled". That includes the
labels or values a progressive classify or extract published before you cancelled it.
For an automatic search, it also covers the job the search delegated to: reading that job by
its id returns no result either, even if it finished before the cancel. Reads that serve a
result, such as query result rows, grounding rows, QA presentations and filtered-search pages,
are refused with 409 job_cancelled. Results you received before the cancel stay with you.
No new download links are issued after the cancel. A link issued before it works until it
expires.