NativePort Llama Parse API

The llamaParse API from NativePort — 2 operation(s) for llamaparse.

GitHub OpenAPI

Operations 2

POST /llamaparse/v2/parse Start a document parse #
GET /llamaparse/v2/parse/{job_id} Read a parse job #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nativeport-ai:nativeport-ai-llamaparse-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

nativeport-ai-llamaparse-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Reference Llama Parse API
  version: 1.0.0
servers:
- url: https://api.nativeport.ai
  description: NativePort production
- url: http://localhost:8787
  description: Local development (wrangler dev)
tags:
- name: llamaParse
paths:
  /llamaparse/v2/parse:
    post:
      operationId: llamaParse_createParse
      summary: Start a document parse
      description: '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_url` is a credential-free `https` URL 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 inline `data:`

        document is never an option: send a URL.

        - `tier` is one of `fast`, `cost_effective`, `agentic`, `agentic_plus` and sets the per-page

        rate for the whole job.

        - `version` is `latest` or a past `YYYY-MM-DD` calendar version.

        - `page_ranges` is **required** and carries exactly one of `max_pages` (1–100) or

        `target_pages` (a 1-based selection, as an integer array or a `start-end` range 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.'
      tags:
      - llamaParse
      responses:
        '200':
          description: '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.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LlamaparseCreatedJob'
        '400':
          description: 'The gateway''s own closed body policy rejected the create before it reached LlamaCloud — a

            missing or unrecognized field, a `source_url` the URL policy refuses,

            an unknown `tier`, a `version` that isn''t `latest` or a past calendar date, a `page_ranges`

            that doesn''t carry exactly one of `max_pages` or `target_pages`, an out-of-bounds or

            ambiguous page selection, or any query parameter (none are permitted). Plain gateway-shaped

            error, not LlamaCloud''s own envelope, since LlamaCloud was never reached — and nothing is

            billed or reserved.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: "Insufficient credits — two distinct checks, at two layers, can answer this status:\n\n- **The account-wide credit gate**, shared by every route in this spec (see [Common\n  responses](/api-reference)), rejects the call before the parse policy runs at all if the\n  account balance is zero or negative.\n- **The create-time reservation**, this route's page-priced preflight: the selected-page\n  ceiling times the tier's per-page rate is reserved against the remaining balance *before*\n  the upstream request, in one atomic step, and a job that doesn't fit is refused rather\n  than forwarded. The message names the price in microcredits and the number of pages\n  selected, so the fix — top up, select fewer pages, or choose a cheaper tier — is\n  unambiguous. Nothing is charged either way.\n"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'No route matched the path, or the matched route disallows that method (an unlisted

            `/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the

            gateway sends it. A path on one of the four model-inference routes also `404`s this way when

            the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model

            addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'The upstream created the resource, but the gateway could not record it as yours — so it was

            discarded rather than handed back untracked, and nothing was charged for it. Retry the

            request.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: 'The upstream call did not produce a response the gateway will forward. LlamaCloud''s own

            error bodies and headers are never relayed — they can echo the shared credential, your

            signed source URL, or document content — so the gateway answers in its own shape and alerts

            its operators. On a create, anything reserved for the job is released.


            `502` covers the two cases the gateway substitutes a status for: an upstream credential

            failure, and a success whose body it could not safely read. When the upstream simply refuses

            a request, **its** status is preserved (so you can tell "I sent something wrong" from "back

            off" from "the upstream is down") and only the body is replaced — with the same

            `{"error": …}` shape shown here, naming that status. A `retry-after` the upstream sent is

            carried over.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        description: '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.

          '
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LlamaparseParseRequest'
      security:
      - bearerAuth: []
  /llamaparse/v2/parse/{job_id}:
    get:
      operationId: llamaParse_getParse
      summary: Read a parse job
      description: '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.'
      tags:
      - llamaParse
      parameters:
      - name: job_id
        in: path
        description: '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.

          '
        required: true
        schema:
          type: string
      - name: expand
        in: query
        description: '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.

          '
        required: false
        schema:
          $ref: '#/components/schemas/LlamaparseV2ParseJobIdGetParametersExpand'
      responses:
        '200':
          description: '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.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LlamaparseJobResponse'
        '400':
          description: 'The status read''s query was rejected. Only `expand` is accepted, only once, and only with

            the value `text` or `markdown` — and `markdown` isn''t available for a `fast`-tier job, which

            produces none. Nothing is billed, and no upstream call is made.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'The bearer token was missing, unknown, or revoked. The reply body is the JSON `{ "error": "Unauthorized." }`.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'No route matched the path, or the matched route disallows that method (an unlisted

            `/serper/<endpoint>`, for instance). The body lists every mounted route, verbatim as the

            gateway sends it. A path on one of the four model-inference routes also `404`s this way when

            the specific endpoint or model isn''t on that provider''s allowlist; an unsupported model

            addressed through `/inference` gets that endpoint''s own `400` instead (see the Inference tag).

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: 'The upstream call did not produce a response the gateway will forward. LlamaCloud''s own

            error bodies and headers are never relayed — they can echo the shared credential, your

            signed source URL, or document content — so the gateway answers in its own shape and alerts

            its operators. On a create, anything reserved for the job is released.


            `502` covers the two cases the gateway substitutes a status for: an upstream credential

            failure, and a success whose body it could not safely read. When the upstream simply refuses

            a request, **its** status is preserved (so you can tell "I sent something wrong" from "back

            off" from "the upstream is down") and only the body is replaced — with the same

            `{"error": …}` shape shown here, naming that status. A `retry-after` the upstream sent is

            carried over.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
      - bearerAuth: []
components:
  schemas:
    LlamaparseParseRequestTier:
      type: string
      enum:
      - fast
      - cost_effective
      - agentic
      - agentic_plus
      description: '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.

        '
      title: LlamaparseParseRequestTier
    LlamaparseV2ParseJobIdGetParametersExpand:
      type: string
      enum:
      - text
      - markdown
      title: LlamaparseV2ParseJobIdGetParametersExpand
    LlamaparseParseRequest:
      type: object
      properties:
        source_url:
          type: string
          format: uri
          maxLength: 2048
          description: '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.

            '
        tier:
          $ref: '#/components/schemas/LlamaparseParseRequestTier'
          description: '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.

            '
        version:
          type: string
          pattern: ^(latest|\d{4}-\d{2}-\d{2})$
          description: '`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.

            '
        page_ranges:
          $ref: '#/components/schemas/LlamaparsePageRanges'
      required:
      - source_url
      - tier
      - version
      - page_ranges
      description: 'The admitted parse request. All four fields are required; unlisted fields are rejected with

        a `400`, and the request forwarded upstream is rebuilt from exactly these fields.

        '
      title: LlamaparseParseRequest
    LlamaparseCreatedJobTier:
      type: string
      enum:
      - fast
      - cost_effective
      - agentic
      - agentic_plus
      description: The tier the job runs at, and the per-page rate it bills at.
      title: LlamaparseCreatedJobTier
    LlamaparseJobResponseJob:
      type: object
      properties:
        id:
          type: string
          description: The job id.
        status:
          $ref: '#/components/schemas/LlamaparseJobStatus'
      description: The job itself.
      title: LlamaparseJobResponseJob
    LlamaparseJobResponse:
      type: object
      properties:
        job:
          $ref: '#/components/schemas/LlamaparseJobResponseJob'
          description: The job itself.
      description: 'The job as LlamaCloud reports it, re-serialized by the gateway. Shared-account identifiers

        and the gateway''s internal reconciliation fields are removed; everything else — including

        the parsed content you paid for — is preserved as it arrived. Field-level detail beyond

        `job.status` belongs to LlamaParse''s own documentation.


        Parsed content appears only when `expand` asked for it, **under the key you asked for** —

        `text` or `markdown`, each an object carrying `pages[]` with `page_number` — never at the

        top level. Every key you did not ask for is present and `null`, so a `"text": null` on a

        `COMPLETED` job means the read carried no `expand`, not that the job produced nothing

        (verified against the live API on 2026-09-10).

        '
      title: LlamaparseJobResponse
    Error:
      type: object
      properties:
        error:
          type: string
          description: Explanatory message meant for humans.
      required:
      - error
      title: Error
    LlamaparsePageRanges:
      type: object
      properties:
        max_pages:
          type: integer
          minimum: 1
          maximum: 100
          description: Parse at most this many pages, from the start of the document.
        target_pages:
          $ref: '#/components/schemas/LlamaparsePageRangesTargetPages'
          description: 'An explicit **1-based** selection — page one of a PDF is `1`. Either spelling works: an

            integer array, or a string of comma-separated page numbers and ascending `start-end`

            ranges. At most 100 unique pages, each page number at most 10000. A repeated,

            overlapping, descending, or empty selection is refused rather than repaired.

            '
      description: '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.

        '
      title: LlamaparsePageRanges
    LlamaparsePageRangesTargetPages:
      oneOf:
      - type: array
        items:
          type: integer
          minimum: 1
          maximum: 10000
      - type: string
        maxLength: 1000
      description: 'An explicit **1-based** selection — page one of a PDF is `1`. Either spelling works: an

        integer array, or a string of comma-separated page numbers and ascending `start-end`

        ranges. At most 100 unique pages, each page number at most 10000. A repeated,

        overlapping, descending, or empty selection is refused rather than repaired.

        '
      title: LlamaparsePageRangesTargetPages
    LlamaparseJobStatus:
      type: string
      enum:
      - PENDING
      - RUNNING
      - COMPLETED
      - FAILED
      - CANCELLED
      description: '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.

        '
      title: LlamaparseJobStatus
    LlamaparseCreatedJob:
      type: object
      properties:
        id:
          type: string
          description: The job id. Poll `GET /llamaparse/v2/parse/{id}` with it, and persist it — it is the only handle to the job.
        status:
          $ref: '#/components/schemas/LlamaparseJobStatus'
        tier:
          $ref: '#/components/schemas/LlamaparseCreatedJobTier'
          description: The tier the job runs at, and the per-page rate it bills at.
      description: 'The create response, re-serialized by the gateway down to exactly these three fields —

        LlamaCloud''s shared-account identifiers and the gateway''s own internal reference are never

        part of it.

        '
      title: LlamaparseCreatedJob
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: '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.

        '