Start a document parse
Relays to https://api.cloud.llamaindex.ai/api/v2/parse, injecting the
Authorization: Bearer credential. Starts an asynchronous parse of the document at
source_url and answers with the job id to poll. This and
GET /llamaparse/v2/parse/{job_id} are the only mounted LlamaParse routes — every other
LlamaParse path answers the gateway’s own 404, this one included under any other method.
The body is a closed allow-set of exactly four fields and at most 8,192 bytes, and the request forwarded upstream is rebuilt from it:
source_urlis a credential-freehttpsURL on any public host — a signed object-storage link, a document on your own site, or any public PDF. LlamaCloud fetches the document itself, from its own network. The body cap is also why an inlinedata:document is never an option: send a URL.tieris one offast,cost_effective,agentic,agentic_plusand sets the per-page rate for the whole job.versionislatestor a pastYYYY-MM-DDcalendar version.page_rangesis required and carries exactly one ofmax_pages(1–100) ortarget_pages(a 1-based selection, as an integer array or astart-endrange string). At most 100 unique pages, no page number above 10000. It is the cost basis, which is why the route asks for it up front instead of defaulting to the whole document.
Query parameters are not accepted, and any field the policy doesn’t recognize is a 400
before LlamaCloud is reached. The job is registered to the calling account, which is the
only account that can read it afterwards.
Before the upstream call, the selected-page ceiling at the tier’s rate is reserved against
your balance; a job that doesn’t fit answers 402 and is never forwarded, and a create that
produces no reachable job releases the reservation in full. Once the job finishes and
LlamaCloud reports what it used, the reservation settles to that exact figure plus the
gateway’s 5.5% fee; while the figure is outstanding the reservation stands, and if it never
arrives the reservation is the charge.
There is no retry. If a create times out ambiguously the job may already exist, so don’t resend it blind — persist the id a create returns and poll the status route.
Authentication
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.
Request
The parse request. A closed allow-set: all four fields are required, and anything not listed
is rejected with a 400 before LlamaCloud is called.
An https URL to the document, carrying no embedded credentials, on any public host —
a signed object-storage link, a document on your own site, or any public PDF. Refused:
any other scheme (http and inline data: included), an embedded user:password, an
IP-literal host in any spelling, and a single-label or .localhost/.local/.internal
hostname. LlamaCloud fetches the document itself, from its own network, so the URL must
be reachable without your credentials.
The parse tier — it sets the per-page rate for the whole job. Listed in ascending cost
order, with the higher tiers being the more capable parsers; see LlamaParse’s own
documentation for what each does with a page. fast produces no markdown, so
expand=markdown is unavailable on a fast job.
latest, or a past YYYY-MM-DD calendar version to pin the parser behaviour to. A
future date is refused. Pinning is what keeps output stable across a parser update;
latest follows it.
The page selection — required, and the basis for both the create-time reservation and
the final charge. Exactly one of max_pages or target_pages: supplying both is refused as
an ambiguous cost basis rather than resolved by a precedence rule you can’t see.
Response
The parse job was created and registered to your account. The gateway re-serializes the
answer down to the three fields you need — the job id to poll, its current status, and the
tier it will be billed at — so LlamaCloud’s shared-account identifiers never reach you. The
upstream’s own success status is preserved, so treat any 2xx here as “the job exists”.
Poll GET /llamaparse/v2/parse/{id} from here. Persist id before doing anything else: it
is the only handle to the job, and to the work already reserved against your balance.
The job id. Poll GET /llamaparse/v2/parse/{id} with it, and persist it — it is the only handle to the job.
Where the job is. PENDING and RUNNING mean keep polling; COMPLETED, FAILED, and
CANCELLED are terminal, and a terminal job’s charge is reconciled to LlamaCloud’s own
exact reported usage, plus the gateway’s 5.5% fee, once that usage is reported — until then,
the create-time reservation stands.
The tier the job runs at, and the per-page rate it bills at.

