Skip to main content
POST
/
v2
/
parse
cURL
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'
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())
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));
{
  "markdown": "<string>",
  "metadata": {
    "job_id": "<string>",
    "model_version": "<string>",
    "page_count": 123,
    "markdown_chars": 123,
    "failed_pages": [
      123
    ],
    "duration_ms": 123,
    "billing": {
      "total_credits": 123
    }
  },
  "structure": {
    "type": "document",
    "children": [
      {
        "page": 123,
        "span": [
          123,
          123
        ],
        "type": "page",
        "width": 123,
        "height": 123,
        "dpi": 123,
        "status": "ok",
        "reason": "<string>",
        "children": [
          {
            "id": "<string>",
            "span": [
              123,
              123
            ],
            "children": [
              "<unknown>"
            ],
            "row": 123,
            "col": 123,
            "colspan": 123,
            "rowspan": 123
          }
        ]
      }
    ]
  },
  "grounding": {
    "type": "document",
    "children": [
      {
        "page": 123,
        "span": [
          123,
          123
        ],
        "type": "page",
        "children": [
          {
            "id": "<string>",
            "span": [
              123,
              123
            ],
            "box": [
              123,
              123,
              123,
              123
            ],
            "parts": [
              {
                "span": [
                  123,
                  123
                ],
                "box": [
                  123,
                  123,
                  123,
                  123
                ]
              }
            ],
            "children": [
              "<unknown>"
            ]
          }
        ]
      }
    ]
  }
}
{
"markdown": "<string>",
"metadata": {
"job_id": "<string>",
"model_version": "<string>",
"page_count": 123,
"markdown_chars": 123,
"failed_pages": [
123
],
"duration_ms": 123,
"billing": {
"total_credits": 123
}
},
"structure": {
"type": "document",
"children": [
{
"page": 123,
"span": [
123,
123
],
"type": "page",
"width": 123,
"height": 123,
"dpi": 123,
"status": "ok",
"reason": "<string>",
"children": [
{
"id": "<string>",
"span": [
123,
123
],
"children": [
"<unknown>"
],
"row": 123,
"col": 123,
"colspan": 123,
"rowspan": 123
}
]
}
]
},
"grounding": {
"type": "document",
"children": [
{
"page": 123,
"span": [
123,
123
],
"type": "page",
"children": [
{
"id": "<string>",
"span": [
123,
123
],
"box": [
123,
123,
123,
123
],
"parts": [
{
"span": [
123,
123
],
"box": [
123,
123,
123,
123
]
}
],
"children": [
"<unknown>"
]
}
]
}
]
}
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Body

multipart/form-data
document
file

The file to parse. The file must be a PDF or image; see the list of supported file types. Provide either document or document_url, not both.

document_url
string

A publicly accessible URL to the file to parse. The file must be a PDF or image; see the list of supported file types. Provide either document or document_url, not both.

model
string

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
ParseOptions · object

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
string

Encrypted PDFs are not currently supported. Providing a password returns a 422 error; decrypt the file before uploading.

Response

The parse response

The parse result: the full document as markdown, its hierarchical structure, per-element spatial grounding, and request metadata.

markdown
string
required

The full document as a single Markdown string, in reading order.

metadata
ParseMetadata · object
required

Information about the request: model version, page count, duration, billing, and more.

structure
Document · object
required

The document's hierarchical structure: pages and the elements detected on each page. Spatial information for each element is in grounding.

grounding
GroundingDocument · object
required

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.