Skip to navigation

Read a parse job

View as Markdown

Relays to https://api.cloud.llamaindex.ai/api/v2/parse/{job_id}, injecting the Authorization: Bearer credential. Answers with the job and its status — PENDING, RUNNING, COMPLETED, FAILED, or CANCELLED — plus, when expand asks for it, the parsed content itself.

Poll this route until the status is terminal (COMPLETED, FAILED, or CANCELLED). Polling is not itself billed; the job’s charge is reconciled to LlamaCloud’s own exact reported usage, plus the gateway’s 5.5% fee, once that usage is reported, whether or not you are polling at that moment. Until then the create-time reservation stands, and if the exact usage is never reported the reservation is what the job is charged.

Ownership is enforced here: the account that created the job is the only one that can read it, and any other account gets the same 404 an unknown id gets, with no upstream call made on its behalf. The gateway re-serializes the answer, so shared-account identifiers and its own internal reconciliation fields never appear in it.

Authentication

AuthorizationBearer

Your per-client bearer token — the API key the gateway issued to you. Present it in Authorization: Bearer <token> form. A token that is missing, unknown, or revoked draws a 401. Before the call is sent upstream the token is removed (stripped, or swapped for the upstream’s own credential); it never makes it past the gateway.

Path parameters

job_idstringRequired

The job id a create returned. Only the account that created the job can read it: an id belonging to another account and an unknown id answer the same 404, refused locally with no upstream call, so the two are indistinguishable. A job you do own whose results LlamaCloud has since expired also answers 404, but that read is authorized and does reach the upstream, so the answer is the upstream’s 404 relayed under the gateway’s error shape rather than the local refusal.

Query parameters

expandenumOptional

Pull the parsed content inline. text returns plain text; markdown returns markdown and is available for every tier except fast, which produces none. No other value is accepted, and the parameter may be given only once. Omit it to read status alone.

Allowed values:

Response

The job as LlamaCloud reports it, re-serialized by the gateway with its shared-account identifiers and internal reconciliation fields removed. job.status is PENDING, RUNNING, COMPLETED, FAILED, or CANCELLED; the first two mean keep polling. Parsed content appears only when expand asked for it.

jobobjectOptional
The job itself.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
502
Bad Gateway Error