POST
/
v1
/
tools
/
agentic-document-analysis
cURL
curl -X POST 'https://api.va.landing.ai/v1/tools/agentic-document-analysis' \
  -H 'Authorization: Basic YOUR_API_KEY' \
  -F 'pdf=@document.pdf' \
  -F 'include_marginalia=true' \
  -F 'include_metadata_in_markdown=true' \
  -F 'fields_schema={"type": "object", "properties": {"field1": {"type": "string"}, "field2": {"type": "string"}}, "required": ["field1", "field2"]}'

# To upload an image instead of a PDF, replace the pdf parameter:
# -F 'image=@document.png'
{
  "data": {
    "markdown": "<string>",
    "chunks": [
      {
        "text": "<string>",
        "grounding": [
          "<any>"
        ],
        "chunk_type": "<any>",
        "chunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    ],
    "extracted_schema": {},
    "extraction_metadata": {}
  },
  "errors": [
    {
      "page_num": 123,
      "error": "<string>",
      "error_code": 123
    }
  ],
  "extraction_error": "<string>"
}

Headers

Authorization
string
required

Enter 'Basic ' followed by your API key.

Get your API key at https://va.landing.ai/settings/api-key.

Query Parameters

pages
string | null

Which pages to process, separated by comma and starting from 0. For example, to process the first 3 pages, use '0,1,2'.

timeout
integer | null
default:480

Body

multipart/form-data

Response

200
application/json

Successful Response

The response is of type object.