GET
Get a job
Request · Guide: Split & classify
Two kinds of job share this route, told apart by kind:
  • extraction (a job_... id) — a document operation. Settles to succeeded or failed, and carries usage.
  • agent (a sajob_... id) — a question asked of the agent. Settles to COMPLETED, FAILED or STOPPED, and carries the answer.
The two report different statuses and different results, so branch on kind before reading the rest. Poll until the status is a settled one; a settled job never changes again — with one exception. An agent job that is FAILED with error.code: "SUPERAGENT_RUN_STALE" was abandoned because it went quiet, not because the agent reported a failure, and it can still resolve to COMPLETED or STOPPED if the run was only slow.

Authorizations

x-api-key
string
header
required

API key for authentication

Path Parameters

job_id
string
required

Response

The job.

job_id
string
required
kind
enum<string>
required

Discriminator. extraction for a document job; agent for a question asked of the agent, which reports different statuses and a different result.

Available options:
extraction
Example:

"extraction"

status
enum<string>
required
Available options:
queued,
succeeded,
failed
created_at
string<date-time>
required
updated_at
string<date-time>
required
client_ref
string | null

Echo of the submitted client_ref.

result
object | null

Present only when status is succeeded.

error
object | null

Present only when status is failed.

usage
object | null

Present once the job has settled.