> ## 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:
                  properties:
                    pages:
                      anyOf:
                        - items:
                            type: integer
                          type: array
                        - type: 'null'
                      default: null
                      title: Pages
                    dpi:
                      default: 200
                      description: >-
                        Resolution for PDF coordinate scaling. Bounding box
                        coordinates and page dimensions are returned in pixels
                        at this DPI (pixels = PDF_points × dpi / 72). Allowed
                        range: 72–300. Has no effect for image inputs.
                      maximum: 300
                      minimum: 72
                      title: Dpi
                      type: integer
                    blocks:
                      $ref: '#/components/schemas/BlocksOptions'
                    grounding:
                      $ref: '#/components/schemas/GroundingOptions'
                  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.
                password:
                  type: string
                  description: >-
                    Encrypted PDFs are not currently supported. Providing a
                    password returns a 422 error; decrypt the file before
                    uploading.
      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: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      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:
      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
    GroundingOptions:
      properties:
        parts:
          default: true
          title: Parts
          type: boolean
      title: GroundingOptions
      type: object
    ParseResponse:
      description: |-
        The parse result: the full document as `markdown`, its hierarchical
        `structure`, per-element spatial `grounding`, 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. Spatial information for each element is in
            `grounding`.
        grounding:
          $ref: '#/components/schemas/GroundingDocument'
          description: >-
            The document's spatial grounding, as a tree mirroring `structure`
            (`document → page → element → table_cell`). Each element node
            carries the same `id` and `span` as in `structure`, plus its
            bounding box and finer-grained parts.
      required:
        - markdown
        - metadata
        - structure
        - grounding
      title: ParseResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BaseElementOptions:
      properties:
        caption:
          default: true
          title: Caption
          type: boolean
      title: BaseElementOptions
      type: object
    TableOptions:
      properties:
        caption:
          default: true
          title: Caption
          type: boolean
        format:
          default: html
          enum:
            - markdown
            - html
          title: Format
          type: string
      title: TableOptions
      type: object
    FigureOptions:
      properties:
        caption:
          default: true
          title: Caption
          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.
          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
        markdown_chars:
          anyOf:
            - type: integer
            - type: 'null'
          description: Number of Unicode code points in the returned `markdown` string.
          title: Markdown Chars
        failed_pages:
          description: >-
            0-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
        - markdown_chars
        - 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
      title: Document
      type: object
    GroundingDocument:
      description: |-
        Root of the `grounding` tree. Mirrors the hierarchy of `structure`
        (`document → page → element → table_cell`), carrying the spatial data
        (`box`, `parts`) that `structure` deliberately omits.
      properties:
        type:
          const: document
          default: document
          description: >-
            The node type. Identifies this node as the root of the grounding
            tree.
          title: Type
          type: string
        children:
          description: >-
            The pages of the document, in source order — the same order as
            `structure.children`.
          items:
            $ref: '#/components/schemas/GroundingPage'
          title: Children
          type: array
      title: GroundingDocument
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    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
        page:
          description: >-
            The 0-indexed page number in the source document. Not contiguous
            when `options.pages` filters out some pages.
          title: Page
          type: integer
        span:
          description: >-
            Unicode code point offsets `[start, end)` in the top-level
            `markdown` string covered by this page. Zero-length `[n, n]` for
            failed pages.
          maxItems: 2
          minItems: 2
          prefixItems:
            - type: integer
            - type: integer
          title: Span
          type: array
        width:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: Page width in pixels. Omitted when `status` is `failed`.
          title: Width
        height:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: Page height in pixels. Omitted when `status` is `failed`.
          title: Height
        dpi:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: >-
            DPI used to scale this page's PDF coordinates to pixels (pixels =
            PDF_points × dpi / 72). Present only for pages that originated from
            a PDF; omitted for image-input pages (which have no DPI concept —
            their coordinates are already pixels relative to the original
            upload) and for pages with `status` `failed`.
          title: Dpi
        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.
          items:
            $ref: '#/components/schemas/Element'
          title: Children
          type: array
      required:
        - page
        - span
      title: Page
      type: object
    GroundingPage:
      description: A page node in the `grounding` tree, mirroring the page in `structure`.
      properties:
        type:
          const: page
          default: page
          description: The node type. Identifies this node as a page in the grounding tree.
          title: Type
          type: string
        page:
          description: >-
            The 0-indexed page number in the source document. Matches the page's
            `page` in the `structure` tree.
          title: Page
          type: integer
        span:
          description: >-
            Unicode code point offsets `[start, end)` in the top-level
            `markdown` string covered by this page. Zero-length `[n, n]` for
            failed pages.
          maxItems: 2
          minItems: 2
          prefixItems:
            - type: integer
            - type: integer
          title: Span
          type: array
        children:
          description: >-
            Grounding for the elements on this page, in reading order — the same
            order and `id`s as the page's `children` in the `structure` tree.
            Empty for failed pages.
          items:
            $ref: '#/components/schemas/GroundingElement'
          title: Children
          type: array
      required:
        - page
        - span
      title: GroundingPage
      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: >-
            A unique identifier for this element within the document. Use it to
            look up the element's entry in the top-level `grounding` map; treat
            the value as opaque.
          title: Id
          type: string
        span:
          description: >-
            Unicode code point offsets `[start, end)` in the top-level
            `markdown` string covered by this element.
          maxItems: 2
          minItems: 2
          prefixItems:
            - type: integer
            - type: integer
          title: Span
          type: array
        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
        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
        - span
      title: Element
      type: object
    GroundingElement:
      description: >-
        Spatial grounding for one document element.


        Mirrors the element's node in the `structure` tree (same `id`, same
        `span`)

        and layers the spatial data on top: the element-level bounding box, its

        fine-grained `parts`, and — for a `table` — its cells nested as
        `children`.
      properties:
        type:
          description: >-
            The element type. Matches the same element's `type` in the
            `structure` tree.
          enum:
            - text
            - table
            - table_cell
            - figure
            - marginalia
            - attestation
            - logo
            - card
            - scan_code
          title: Type
          type: string
        id:
          description: >-
            The element's unique identifier within the document. Matches the
            same element's `id` in the `structure` tree.
          title: Id
          type: string
        span:
          description: >-
            Unicode code point offsets `[start, end)` in the top-level
            `markdown` string covered by this element. Matches the element's
            `span` in the `structure` tree.
          maxItems: 2
          minItems: 2
          prefixItems:
            - type: integer
            - type: integer
          title: Span
          type: array
        box:
          description: >-
            Bounding box `[left, top, right, bottom]` for the full element on
            the source page, in pixels.
          maxItems: 4
          minItems: 4
          prefixItems:
            - type: integer
            - type: integer
            - type: integer
            - type: integer
          title: Box
          type: array
        parts:
          description: >-
            Finer-grained grounding segments within the element. Per visual line
            for `text` and `marginalia`; empty for other element types or when
            `options.grounding.parts` is `false`.
          items:
            $ref: '#/components/schemas/GroundingEntry'
          title: Parts
          type: array
        children:
          anyOf:
            - items:
                $ref: '#/components/schemas/GroundingElement'
              type: array
            - type: 'null'
          default: null
          description: >-
            The cells (`table_cell` grounding nodes) of a `table` element,
            mirroring the table's `children` in the `structure` tree. Present
            only when `type` is `table`.
          title: Children
      required:
        - type
        - id
        - span
        - box
      title: GroundingElement
      type: object
    GroundingEntry:
      description: One fine-grained grounding segment (line-level or finer).
      properties:
        span:
          description: >-
            Unicode code point offsets `[start, end)` in the top-level
            `markdown` string covered by this part.
          maxItems: 2
          minItems: 2
          prefixItems:
            - type: integer
            - type: integer
          title: Span
          type: array
        box:
          description: >-
            Bounding box `[left, top, right, bottom]` for this part on the
            source page, in pixels.
          maxItems: 4
          minItems: 4
          prefixItems:
            - type: integer
            - type: integer
            - type: integer
            - type: integer
          title: Box
          type: array
      required:
        - span
        - box
      title: GroundingEntry
      type: object

````