Skip to main content

Runs

The /v1/runs endpoints are the core of the Docex API. Create a run with an upload ID and prompt, poll for completion, and receive a structured envelope.

Create a run

Headers

string
required
Your Docex API key.
string
required
Must be application/json.

Body

string
required
The upload ID returned from POST /v1/uploads/presign.
string
required
Plain-English description of the analysis task. Example: "company name, number, expiry".
string
Either json (default) or text.
string
Reference to a built-in registry schema. Use instead of inline schema.
object
Inline custom schema with label, expectedFields, and promptScaffold.
string
Optional workflow label used for dashboard filtering and usage summaries.
object
Arbitrary key-value pairs attached to the job record.
boolean
Explicitly confirm a job whose estimated cost exceeds the confirmation threshold.
number
Abort the job if the estimated cost exceeds this budget.

Response

Get a run

Poll this endpoint until status is completed or failed.

Response (completed)

Response (failed)

Verify a run

Accept or correct an analysis result as QA metadata for dashboard review. Verification does not promote models or change routing policy.

Body

boolean
Mark the result as accepted.
object
Key-value pairs of corrected fields.

Code examples