> ## Documentation Index
> Fetch the complete documentation index at: https://docs.landing.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ADE Parse

> Parse a document and return the parse response inline.



## OpenAPI

````yaml /dpt3/openapi-adev2.json post /v2/parse
openapi: 3.1.0
info:
  title: >-
    LandingAI Agentic Document Extraction (ADE) API v2: Parse and Extract
    Documents with DPT-3
  description: >-
    Parse and extract data from documents with DPT-3, a document parsing model
    from LandingAI, using the Agentic Document Extraction (ADE) v2 endpoints.
    Parse converts PDFs and images into structured Markdown and elements with
    per-element grounding (page numbers and coordinates) for RAG, search, and
    extraction pipelines. Extract pulls specific fields from parsed Markdown
    using a JSON schema. Documentation: https://docs.landing.ai
  version: 1.0.0
servers:
  - url: https://api.ade.landing.ai
    description: Production vision tools API
security: []
paths:
  /v2/parse:
    post:
      tags:
        - Parse
      summary: ADE Parse
      description: Parse a document and return the parse response inline.
      operationId: parse_run_sync
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                document:
                  type: string
                  format: binary
                  description: >-
                    The file to parse. The file must be a PDF or image; see the
                    list of [supported file
                    types](https://docs.landing.ai/dpt3/file-types). Provide
                    either `document` or `document_url`, not both.
                document_url:
                  type: string
                  description: >-
                    A publicly accessible URL to the file to parse. The file
                    must be a PDF or image; see the list of [supported file
                    types](https://docs.landing.ai/dpt3/file-types). Provide
                    either `document` or `document_url`, not both.
                model:
                  type: string
                  description: >-
                    The DPT-3 model snapshot to use for this request. Accepts a
                    dated snapshot (for example, `dpt-3-pro-20260710`), the
                    `dpt-3-pro-latest` alias, or the bare `dpt-3-pro` family
                    name (equivalent to `dpt-3-pro-latest`). Defaults to the
                    latest DPT-3 Pro snapshot.
                options:
                  additionalProperties: false
                  properties:
                    pages:
                      anyOf:
                        - items:
                            type: integer
                          type: array
                        - type: 'null'
                      default: null
                      title: Pages
                    blocks:
                      $ref: '#/components/schemas/BlocksOptions'
                    atomic_grounding:
                      default: true
                      description: >-
                        Include the fine-grained `atomic_grounding` array on
                        leaf elements. Set `false` to omit the field entirely
                        from every node.
                      title: Atomic Grounding
                      type: boolean
                    inline_markdown:
                      default: false
                      description: >-
                        Include each node's slice of the document `markdown`
                        inline as a `markdown` field on every structure node:
                        the document root, each page, and each element
                        (including table cells). `atomic_grounding` entries do
                        not carry it.
                      title: Inline Markdown
                      type: boolean
                    password:
                      anyOf:
                        - type: string
                        - type: 'null'
                      default: null
                      description: >-
                        Password for encrypted PDFs. Not currently supported —
                        providing a value returns a 422 error; decrypt the file
                        before uploading.
                      title: Password
                  title: ParseOptions
                  type: object
                  description: >-
                    Optional object that customizes the parse. Use it to select
                    which pages to process, adjust how content appears in the
                    Markdown, or control how much detail the response includes.
                    Sent as a JSON-serialized string in form data.
      responses:
        '200':
          description: The parse response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParseResponse'
        '206':
          description: Partial success (some pages failed to parse)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParseResponse'
        '422':
          description: Request validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl -X POST 'https://api.ade.landing.ai/v2/parse' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -F 'document=@document.pdf' \
              -F 'model=dpt-3-pro-latest'
        - lang: Python
          label: Python
          source: >-
            import requests


            url = 'https://api.ade.landing.ai/v2/parse'

            headers = {'Authorization': 'Bearer YOUR_API_KEY'}


            files = {'document': open('document.pdf', 'rb')}

            data = {'model': 'dpt-3-pro-latest'}


            response = requests.post(url, headers=headers, files=files,
            data=data)

            print(response.json())
        - lang: JavaScript
          label: Node.js
          source: |-
            const axios = require('axios');
            const FormData = require('form-data');
            const fs = require('fs');

            const form = new FormData();
            form.append('document', fs.createReadStream('document.pdf'));
            form.append('model', 'dpt-3-pro-latest');

            axios.post('https://api.ade.landing.ai/v2/parse', form, {
              headers: { 'Authorization': 'Bearer YOUR_API_KEY', ...form.getHeaders() }
            })
              .then(response => console.log(response.data))
              .catch(error => console.error(error));
components:
  schemas:
    BlocksOptions:
      additionalProperties: false
      properties:
        text:
          $ref: '#/components/schemas/BaseElementOptions'
        table:
          $ref: '#/components/schemas/TableOptions'
        figure:
          $ref: '#/components/schemas/FigureOptions'
        marginalia:
          $ref: '#/components/schemas/BaseElementOptions'
        attestation:
          $ref: '#/components/schemas/BaseElementOptions'
        logo:
          $ref: '#/components/schemas/BaseElementOptions'
        scan_code:
          $ref: '#/components/schemas/BaseElementOptions'
        card:
          $ref: '#/components/schemas/BaseElementOptions'
      title: BlocksOptions
      type: object
    ParseResponse:
      description: |-
        The parse result: the full document as `markdown`, its hierarchical
        `structure` (with per-node spatial `grounding` inline), and request
        `metadata`.
      properties:
        markdown:
          description: The full document as a single Markdown string, in reading order.
          title: Markdown
          type: string
        metadata:
          $ref: '#/components/schemas/ParseMetadata'
          description: >-
            Information about the request: model version, page count, duration,
            billing, and more.
        structure:
          $ref: '#/components/schemas/Document'
          description: >-
            The document's hierarchical structure: pages and the elements
            detected on each page. Every node below the root carries its spatial
            data inline in a `grounding` object (`{page, range, box}`,
            normalized page coordinates); leaf elements additionally carry
            `atomic_grounding`.
      required:
        - markdown
        - metadata
        - structure
      title: ParseResponse
      type: object
    ErrorResponse:
      type: object
      title: ErrorResponse
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: >-
            Stable snake_case error code (e.g. ``validation_error``,
            ``unknown_model_version``, ``invalid_url``, ``invalid_api_key``,
            ``rate_limit_exceeded``).
        message:
          type: string
          description: Human-readable detail.
    BaseElementOptions:
      additionalProperties: false
      properties:
        markdown:
          default: true
          title: Markdown
          type: boolean
      title: BaseElementOptions
      type: object
    TableOptions:
      additionalProperties: false
      properties:
        markdown:
          default: true
          title: Markdown
          type: boolean
        format:
          default: html
          enum:
            - markdown
            - html
          title: Format
          type: string
      title: TableOptions
      type: object
    FigureOptions:
      additionalProperties: false
      properties:
        markdown:
          default: true
          title: Markdown
          type: boolean
      title: FigureOptions
      type: object
    ParseMetadata:
      description: >-
        Information about a parse request. This is the customer-facing shape —

        the internal billing-canonical metadata
        (``aide_common.parse_schema.ParseMetadata``)

        is projected into it at the render boundary
        (``project_customer_metadata``).
      properties:
        job_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The parse job identifier — always server-minted and unique per
            submit. On the async `/jobs` route this is the id the caller polls.
            Correlates with the job's entry in your billing dashboard. Format:
            ``<service>-<26-character Crockford base32 ULID>`` matching
            ``^(parse|extract)-[0-9a-hjkmnp-tv-z]{26}$``. Opaque, server-minted,
            and stable for the life of the job — the same id is returned on the
            sync response, the async 202, and every poll. Treat it as opaque;
            older id formats remain accepted indefinitely and are never
            re-issued.
          title: Job Id
        model_version:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The exact model snapshot that parsed the document, e.g.
            `dpt-3-pro-20260710`.
          title: Model Version
        page_count:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Total number of pages in the source document. Includes pages
            filtered out by `options.pages`; the actual returned pages are in
            `structure.children`.
          title: Page Count
        output_markdown_chars:
          anyOf:
            - type: integer
            - type: 'null'
          description: Number of Unicode code points in the returned `markdown` string.
          title: Output Markdown Chars
        range_units:
          const: unicode_codepoints
          description: >-
            Units of every `range` offset in the response. Always
            `"unicode_codepoints"` (Unicode code points into `markdown`).
            Declared explicitly so consumers know how to slice the string — e.g.
            JavaScript strings are UTF-16, so a naive `.slice()` drifts when the
            markdown contains astral characters; such consumers must convert
            code-point offsets to UTF-16 indices first.
          title: Range Units
          type: string
        openapi_spec:
          description: >-
            URL of the OpenAPI spec covering this API, for inspection and client
            generation.
          title: Openapi Spec
          type: string
        failed_pages:
          description: >-
            1-indexed page numbers that failed to parse. Empty when all pages
            succeed; failed pages also appear in `structure.children` with
            `status: failed`.
          items:
            type: integer
          title: Failed Pages
          type: array
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          description: Total processing time in milliseconds.
          title: Duration Ms
        billing:
          $ref: '#/components/schemas/ParseBilling'
          description: 'Billing summary: the service tier and the credits charged.'
      required:
        - job_id
        - model_version
        - page_count
        - output_markdown_chars
        - range_units
        - openapi_spec
        - failed_pages
        - duration_ms
        - billing
      title: ParseMetadata
      type: object
    Document:
      properties:
        type:
          const: document
          default: document
          description: >-
            The node type. Identifies this node as the root of the structure
            tree.
          title: Type
          type: string
        children:
          description: The pages of the document, in source order.
          items:
            $ref: '#/components/schemas/Page'
          title: Children
          type: array
        markdown:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            The full document markdown — identical to the top-level `markdown`
            field, included so the structure tree is self-contained. Present
            only when `options.inline_markdown` is `true`.
          title: Markdown
      title: Document
      type: object
    ParseBilling:
      description: Billing summary for one parse request.
      properties:
        service_tier:
          anyOf:
            - enum:
                - standard
                - priority
              type: string
            - type: 'null'
          description: >-
            The service tier the request ran in: `standard` or `priority`. A
            sync request reports `priority` (same lane, same price).
          title: Service Tier
        total_credits:
          anyOf:
            - type: number
            - type: 'null'
          description: Credits charged for this request.
          title: Total Credits
      required:
        - service_tier
        - total_credits
      title: ParseBilling
      type: object
    Page:
      properties:
        type:
          const: page
          default: page
          description: The node type. Identifies this node as a page in the structure tree.
          title: Type
          type: string
        grounding:
          $ref: '#/components/schemas/Grounding'
          description: >-
            The page's spatial data: `page` is the 1-indexed page number in the
            source document (not contiguous when `options.pages` filters out
            some pages); `range` covers this page's content in the top-level
            `markdown` string (zero-length `start == end` for failed pages);
            `box` is always the full page `{0, 0, 1, 1}`.
        status:
          default: ok
          description: >-
            Whether this page was parsed successfully (`ok`) or failed
            (`failed`).
          enum:
            - ok
            - failed
          title: Status
          type: string
        reason:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Failure reason. Present only when `status` is `failed`.
          title: Reason
        children:
          description: >-
            The elements detected on this page, in reading order. Empty for
            failed pages.
          items:
            $ref: '#/components/schemas/Element'
          title: Children
          type: array
        markdown:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            This page's slice of the top-level `markdown` string
            (`markdown[grounding.range.start:grounding.range.end]`). `""` for
            failed pages. Present only when `options.inline_markdown` is `true`.
          title: Markdown
      required:
        - grounding
      title: Page
      type: object
    Grounding:
      description: |-
        Where a node lives: its page, its slice of `markdown`, and its box.

        The same shape is used for page nodes, element nodes, and each
        `atomic_grounding` entry, so any grounding object is self-contained — it
        can be lifted out of the tree and still locates its content.
      properties:
        page:
          description: >-
            1-indexed page number this grounding is on. On a page node, the
            page's own number.
          title: Page
          type: integer
        range:
          $ref: '#/components/schemas/Range'
          description: >-
            `[start, end)` offsets into the top-level `markdown` string covered
            by this node or segment.
        box:
          $ref: '#/components/schemas/Box'
          description: >-
            Bounding box in normalized page coordinates (`0`–`1` fractions of
            page width/height, at most 8 decimal places). A page node's box is
            always the full page `{0, 0, 1, 1}`.
      required:
        - page
        - range
        - box
      title: Grounding
      type: object
    Element:
      description: |-
        Hierarchical document element. All non-page elements share this shape.

        Keys off `type`; optional fields are excluded from the serialized JSON
        via ``exclude_none=True`` when not set.
      properties:
        type:
          description: >-
            The element type. Determines which optional fields appear on this
            element.
          enum:
            - text
            - table
            - table_cell
            - figure
            - marginalia
            - attestation
            - logo
            - card
            - scan_code
          title: Type
          type: string
        id:
          description: >-
            Semantic element id, unique within the document. Format
            `<type>-<index>`, where `<index>` is a per-type 0-based counter
            assigned in reading order — `text-0` is the first text element in
            the document, `figure-0` the first figure, `table_cell-0` the first
            cell of the first table. Stable within a response but not across
            re-parses of the same document.
          title: Id
          type: string
        grounding:
          $ref: '#/components/schemas/Grounding'
          description: >-
            The element's spatial data: the page it appears on, its `[start,
            end)` range in the top-level `markdown` string, and its bounding box
            in normalized page coordinates.
        atomic_grounding:
          anyOf:
            - items:
                $ref: '#/components/schemas/Grounding'
              type: array
            - type: 'null'
          default: null
          description: >-
            Fine-grained grounding segments at the model's current granularity
            (visual lines today; finer in future versions, same schema). Present
            only on leaf elements — every type except `table`. `[]` only when
            segments are structurally impossible: `table_cell` (a cell has no
            finer granularity than itself) and elements whose markdown is
            suppressed via `blocks.<type>.markdown=false`. Any other leaf the
            model could not segment finer carries a single entry covering the
            element's full range and box. Omitted entirely when
            `options.atomic_grounding` is `false`.
          title: Atomic Grounding
        children:
          anyOf:
            - items:
                $ref: '#/components/schemas/Element'
              type: array
            - type: 'null'
          default: null
          description: >-
            The cells (`table_cell` elements) of a `table` element. Present only
            when `type` is `table`.
          title: Children
        markdown:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            The element's slice of the top-level `markdown` string
            (`markdown[grounding.range.start:grounding.range.end]`). `""` for
            zero-length ranges (e.g. blocks suppressed via
            `blocks.<type>.markdown=false`). Present only when
            `options.inline_markdown` is `true`.
          title: Markdown
        row:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: >-
            0-indexed row position of this cell within its parent `table`.
            Present only on `table_cell` elements.
          title: Row
        col:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: >-
            0-indexed column position of this cell within its parent `table`.
            Present only on `table_cell` elements.
          title: Col
        colspan:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: >-
            Number of columns this cell spans. `1` for unmerged cells. Present
            only on `table_cell` elements.
          title: Colspan
        rowspan:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: >-
            Number of rows this cell spans. `1` for unmerged cells. Present only
            on `table_cell` elements.
          title: Rowspan
      required:
        - type
        - id
        - grounding
      title: Element
      type: object
    Range:
      description: A `[start, end)` slice of the top-level `markdown` string.
      properties:
        start:
          description: >-
            Inclusive start offset into the top-level `markdown` string, in the
            units declared by `metadata.range_units` (Unicode code points).
          title: Start
          type: integer
        end:
          description: >-
            Exclusive end offset into the top-level `markdown` string, in the
            units declared by `metadata.range_units` (Unicode code points).
          title: End
          type: integer
      required:
        - start
        - end
      title: Range
      type: object
    Box:
      description: >-
        Axis-aligned bounding box in normalized page coordinates.


        Every value is a fraction of the page's width (`xmin`/`xmax`) or height

        (`ymin`/`ymax`) in `[0, 1]`, with at most 8 decimal places. To convert
        to

        pixels, multiply by the dimensions of whatever raster of the page you
        are

        drawing on. Coordinates are clamped and rounded at construction so the

        in-process value always equals the serialized one.
      properties:
        xmin:
          description: Left edge as a fraction of the page width, in `[0, 1]`.
          title: Xmin
          type: number
        ymin:
          description: Top edge as a fraction of the page height, in `[0, 1]`.
          title: Ymin
          type: number
        xmax:
          description: Right edge as a fraction of the page width, in `[0, 1]`.
          title: Xmax
          type: number
        ymax:
          description: Bottom edge as a fraction of the page height, in `[0, 1]`.
          title: Ymax
          type: number
      required:
        - xmin
        - ymin
        - xmax
        - ymax
      title: Box
      type: object

````