Landing.ai Tools API

The Tools API from Landing.ai — 50 operation(s) for tools.

OpenAPI Specification

landingai-tools-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: 'LandingAI Agentic Document Extraction (ADE) API v1: Parse, Extract, Classify, Split, Section Classes Tools API'
  version: 0.1.0
  description: 'Convert documents such as PDFs, images, and Office files into structured data with LandingAI''s Agentic Document Extraction (ADE) v1 endpoints. Includes Parse (documents to Markdown and structured chunks with grounding), Extract (schema-based field extraction), Classify (page-level classification), Split (separate multi-document files), and Section (hierarchical table of contents), plus asynchronous jobs for parsing and extraction. Documentation: https://docs.landing.ai'
servers:
- url: https://api.va.landing.ai
  description: Production vision tools API
tags:
- name: Tools
paths:
  /v1/ade/parse:
    post:
      tags:
      - Tools
      summary: ADE Parse
      description: "Parse a document or spreadsheet.\n\nThis endpoint parses documents (PDF, images)\n    and spreadsheets (XLSX, CSV) into structured Markdown, chunks, and metadata.\n    \n\n For EU users, use this endpoint:\n\n\n    `https://api.va.eu-west-1.landing.ai/v1/ade/parse`."
      operationId: tool_ade_parse_v1_ade_parse_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ParseRequestWithEncryptedPassword'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParseResponse'
        '206':
          description: There were some pages that failed to be parsed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParseResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
      security:
      - Basic Auth: []
      x-codeSamples:
      - lang: cURL
        label: cURL
        source: "curl -X POST 'https://api.va.landing.ai/v1/ade/parse' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -F 'document=@document.pdf' \\\n  -F 'model=dpt-2-latest'  # Set the model (optional)"
      - lang: Python
        label: Python
        source: "import requests\nimport json\n\nheaders = {\n    'Authorization': 'Bearer YOUR_API_KEY'\n}\n\nurl = 'https://api.va.landing.ai/v1/ade/parse'\n\n# Set the model (optional)\ndata = {\n    'model': 'dpt-2-latest'\n}\n\n# Upload a document \ndocument = open('document.pdf', 'rb')\nfiles = {'document': document}\n\nresponse = requests.post(url, files=files, data=data, headers=headers)\nprint(response.json())"
      - lang: JavaScript
        label: Node.js
        source: "const axios = require('axios');\nconst FormData = require('form-data');\nconst fs = require('fs');\n\nconst form = new FormData();\nform.append('document', fs.createReadStream('document.pdf'));\n\n// Set the model (optional)\nform.append('model', 'dpt-2-latest');\n\naxios.post('https://api.va.landing.ai/v1/ade/parse', form, {\n  headers: {\n    'Authorization': 'Bearer YOUR_API_KEY',\n    ...form.getHeaders()\n  }\n})\n.then(response => console.log(response.data))\n.catch(error => console.error(error));"
  /v1/ade/extract:
    post:
      tags:
      - Tools
      summary: ADE Extract
      description: "Extract structured data from Markdown using a JSON schema.\n\nThis endpoint\n    processes Markdown content and extracts structured data according to the provided\n    JSON schema.\n\nFor EU users, use this endpoint:\n\n\n    `https://api.va.eu-west-1.landing.ai/v1/ade/extract`."
      operationId: tool_ade_extract_v1_ade_extract_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ExtractRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractResponse'
        '206':
          description: Extraction completed with success but there was a schema validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
      security:
      - Basic Auth: []
      x-codeSamples:
      - lang: cURL
        label: cURL
        source: "curl -X POST 'https://api.va.landing.ai/v1/ade/extract' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -F 'schema={\"type\": \"object\", \"properties\": {\"field1\": {\"type\": \"string\"}, \"field2\": {\"type\": \"string\"}}}' \\\n  -F 'markdown=@markdown.md' \\\n  -F 'model=extract-latest'"
      - lang: Python
        label: Python
        source: "import requests\n\nheaders = {\n    'Authorization': 'Bearer YOUR_API_KEY'\n}\n\nurl = 'https://api.va.landing.ai/v1/ade/extract'\n\n# Read the schema file as a string\nwith open('schema.json', 'r') as f:\n    schema_content = f.read()\n\n# Prepare files and data\nfiles = {'markdown': open('markdown.md', 'rb')}\ndata = {\n    'schema': schema_content,\n    'model': 'extract-latest'\n}\n\n# Run extraction\nresponse = requests.post(url, files=files, data=data, headers=headers)\n\n# Return the results\nprint(response.json())"
      - lang: JavaScript
        label: Node.js
        source: "const axios = require('axios');\nconst FormData = require('form-data');\nconst fs = require('fs');\n\nconst form = new FormData();\nform.append('markdown', fs.createReadStream('markdown.md'));\nform.append('schema', fs.readFileSync('schema.json', 'utf8'));\nform.append('model', 'extract-latest');\n\naxios.post('https://api.va.landing.ai/v1/ade/extract', form, {\n  headers: {\n    'Authorization': 'Bearer YOUR_API_KEY',\n    ...form.getHeaders()\n  }\n})\n.then(response => console.log(response.data))\n.catch(error => console.error(error));"
  /v1/ade/extract/jobs:
    post:
      tags:
      - Tools
      summary: ADE Extract Jobs
      description: 'Extract structured data asynchronously.


        This endpoint creates a job that handles the processing for large markdown

        documents.


        For EU users, use this endpoint:


        `https://api.va.eu-west-1.landing.ai/v1/ade/extract/jobs`.'
      operationId: tool_ade_extract_jobs_v1_ade_extract_jobs_post
      security:
      - Basic Auth: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AsyncExtractRequest'
      responses:
        '202':
          description: Job queued successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobCreationResponse'
              example:
                job_id: 12345678-1234-1234-1234-123456789012
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
      x-codeSamples:
      - lang: cURL
        label: cURL
        source: "curl -X POST 'https://api.va.landing.ai/v1/ade/extract/jobs' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -F 'schema={\"type\": \"object\", \"properties\": {\"field1\": {\"type\": \"string\"}, \"field2\": {\"type\": \"string\"}}}' \\\n  -F 'markdown=@markdown.md' \\\n  -F 'model=extract-latest'"
      - lang: Python
        label: Python
        source: "import requests\n\nheaders = {\n    'Authorization': 'Bearer YOUR_API_KEY'\n}\n\nurl = 'https://api.va.landing.ai/v1/ade/extract/jobs'\n\n# Read the schema file as a string\nwith open('schema.json', 'r') as f:\n    schema_content = f.read()\n\n# Prepare files and data\nfiles = {'markdown': open('markdown.md', 'rb')}\ndata = {\n    'schema': schema_content,\n    'model': 'extract-latest'\n}\n\nresponse = requests.post(url, files=files, data=data, headers=headers)\nprint(response.json())"
      - lang: JavaScript
        label: Node.js
        source: "const axios = require('axios');\nconst FormData = require('form-data');\nconst fs = require('fs');\n\nconst form = new FormData();\nform.append('markdown', fs.createReadStream('markdown.md'));\nform.append('schema', fs.readFileSync('schema.json', 'utf8'));\nform.append('model', 'extract-latest');\n\naxios.post('https://api.va.landing.ai/v1/ade/extract/jobs', form, {\n  headers: {\n    'Authorization': 'Bearer YOUR_API_KEY',\n    ...form.getHeaders()\n  }\n})\n.then(response => console.log(response.data))\n.catch(error => console.error(error));"
    get:
      tags:
      - Tools
      summary: ADE List Extract Jobs
      description: 'List all async extract jobs associated with your API key.


        Returns the list of jobs or an error response. For EU users, use this endpoint:


        `https://api.va.eu-west-1.landing.ai/v1/ade/extract/jobs`.'
      operationId: tool_ade_list_extract_jobs_v1_ade_extract_jobs_get
      security:
      - Basic Auth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          description: Page number (0-indexed)
          default: 0
          title: Page
        description: Page number (0-indexed)
      - name: pageSize
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          description: Number of items per page
          default: 10
          title: Pagesize
        description: Number of items per page
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - enum:
            - cancelled
            - completed
            - failed
            - pending
            - processing
            type: string
          - type: 'null'
          description: Filter by job status.
          title: Status
        description: Filter by job status.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobsListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: cURL
        label: cURL
        source: "curl -X GET 'https://api.va.landing.ai/v1/ade/extract/jobs' \\\n  -H 'Authorization: Bearer YOUR_API_KEY'"
      - lang: Python
        label: Python
        source: "import requests\n\nheaders = {\n    'Authorization': 'Bearer YOUR_API_KEY'\n}\n\nurl = 'https://api.va.landing.ai/v1/ade/extract/jobs'\n\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
      - lang: JavaScript
        label: Node.js
        source: "const axios = require('axios');\n\nconst url = 'https://api.va.landing.ai/v1/ade/extract/jobs';\n\naxios.get(url, {\n  headers: {\n    'Authorization': 'Bearer YOUR_API_KEY'\n  }\n})\n.then(response => console.log(response.data))\n.catch(error => console.error(error));"
  /v1/ade/extract/jobs/{job_id}:
    get:
      tags:
      - Tools
      summary: ADE Get Extract Jobs
      description: "Get the status for an async extract job.\n\nReturns the job status or an error\n   response. For EU users, use this endpoint:\n\n\n   `https://api.va.eu-west-1.landing.ai/v1/ade/extract/jobs/{job_id}`."
      operationId: tool_ade_get_extract_jobs_v1_ade_extract_jobs__job_id__get
      security:
      - Basic Auth: []
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: string
          title: Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractJobStatusResponse'
        '206':
          description: Extraction completed with success but there was a schema validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtractJobStatusResponse'
        '404':
          description: Job ID not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: cURL
        label: cURL
        source: "curl -X GET 'https://api.va.landing.ai/v1/ade/extract/jobs/{job_id}' \\\n  -H 'Authorization: Bearer YOUR_API_KEY'"
      - lang: Python
        label: Python
        source: "import requests\n\nheaders = {\n    'Authorization': 'Bearer YOUR_API_KEY'\n}\n\nurl = f'https://api.va.landing.ai/v1/ade/extract/jobs/{job_id}'\n\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
      - lang: JavaScript
        label: Node.js
        source: "const axios = require('axios');\n\nconst url = `https://api.va.landing.ai/v1/ade/extract/jobs/{jobId}`;\n\naxios.get(url, {\n  headers: {\n    'Authorization': 'Bearer YOUR_API_KEY'\n  }\n})\n.then(response => console.log(response.data))\n.catch(error => console.error(error));"
  /v1/ade/extract/build-schema:
    post:
      tags:
      - Tools
      summary: ADE Build Extract Schema
      description: "Generate a JSON schema from Markdown using AI.\n\nThis endpoint analyzes Markdown\n    content and generates a JSON schema suitable for use with the extract endpoint.\n    It can also refine an existing schema based on new documents or iterate on a schema\n    based on prompt instructions.\n\nFor EU users, use this endpoint:\n\n\n    `https://api.va.eu-west-1.landing.ai/v1/ade/extract/build-schema`."
      operationId: tool_ade_build_schema_v1_ade_extract_build_schema_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BuildSchemaRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuildSchemaResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - Basic Auth: []
      x-codeSamples:
      - lang: cURL
        label: cURL
        source: "curl -X POST 'https://api.va.landing.ai/v1/ade/extract/build-schema' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -F 'markdowns=@markdown.md' \\\n  -F 'model=extract-latest' \\\n  -F 'prompt=Extract invoice fields including vendor, date, and total amount'"
      - lang: Python
        label: Python
        source: "import requests\n\nheaders = {\n    'Authorization': 'Bearer YOUR_API_KEY'\n}\n\nurl = 'https://api.va.landing.ai/v1/ade/extract/build-schema'\n\n# Prepare files and data\nfiles = [('markdowns', open('markdown.md', 'rb'))]\ndata = {\n    'model': 'extract-latest',\n    'prompt': 'Extract invoice fields including vendor, date, and total amount'\n}\n\nresponse = requests.post(url, files=files, data=data, headers=headers)\nprint(response.json())"
      - lang: JavaScript
        label: Node.js
        source: "const axios = require('axios');\nconst FormData = require('form-data');\nconst fs = require('fs');\n\nconst form = new FormData();\nform.append('markdowns', fs.createReadStream('markdown.md'));\nform.append('model', 'extract-latest');\nform.append('prompt', 'Extract invoice fields including vendor, date, and total amount');\n\naxios.post('https://api.va.landing.ai/v1/ade/extract/build-schema', form, {\n  headers: {\n    'Authorization': 'Bearer YOUR_API_KEY',\n    ...form.getHeaders()\n  }\n})\n.then(response => console.log(response.data))\n.catch(error => console.error(error));"
  /v1/ade/split:
    post:
      tags:
      - Tools
      summary: ADE Split
      description: "Split classification for documents.\n\nThis endpoint classifies document sections\n    based on markdown content and split options.\n\nFor EU users, use this endpoint:\n\n\n    `https://api.va.eu-west-1.landing.ai/v1/ade/split`."
      operationId: tool_ade_split_v1_ade_split_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SplitRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SplitResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - Basic Auth: []
      x-codeSamples:
      - lang: cURL
        label: cURL
        source: "curl -X POST 'https://api.va.landing.ai/v1/ade/split' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -F 'markdown=@markdown.md' \\\n  -F 'split_class=[{\"name\": \"split type name\", \"description\": \"description of split type\", \"identifier\": \"unique identifier field\"}]' \\\n  -F 'model=split-latest'"
      - lang: Python
        label: Python
        source: "import requests\nimport json\n\nheaders = {\n    'Authorization': 'Bearer YOUR_API_KEY'\n}\n\nurl = 'https://api.va.landing.ai/v1/ade/split'\n\n# Prepare split classes\nsplit_class = [\n    {\n        'name': 'split type name',\n        'description': 'description of split type',\n        'identifier': 'unique identifier field'\n    }\n]\n\n# Prepare files and data\nfiles = {'markdown': open('markdown.md', 'rb')}\ndata = {\n    'split_class': json.dumps(split_class),\n    'model': 'split-latest'\n}\n\n# Run split classification\nresponse = requests.post(url, files=files, data=data, headers=headers)\n\n# Return the results\nprint(response.json())"
      - lang: JavaScript
        label: Node.js
        source: "const axios = require('axios');\nconst FormData = require('form-data');\nconst fs = require('fs');\n\nconst form = new FormData();\nform.append('markdown', fs.createReadStream('markdown.md'));\n\nconst splitClass = [\n  {\n    name: 'split type name',\n    description: 'description of split type',\n    identifier: 'unique identifier field'\n  }\n];\n\nform.append('split_class', JSON.stringify(splitClass));\nform.append('model', 'split-latest');\n\naxios.post('https://api.va.landing.ai/v1/ade/split', form, {\n  headers: {\n    'Authorization': 'Bearer YOUR_API_KEY',\n    ...form.getHeaders()\n  }\n})\n.then(response => console.log(response.data))\n.catch(error => console.error(error));"
  /v1/ade/section:
    post:
      tags:
      - Tools
      summary: ADE Section
      description: 'Section parsed markdown into a hierarchical table of contents.


        This endpoint accepts the markdown output from /ade/parse

        (with reference anchors) and returns a flat, reading-order list of

        sections with hierarchy levels and reference ranges.


        For EU users, use this endpoint:


        `https://api.va.eu-west-1.landing.ai/v1/ade/section`.'
      operationId: tool_ade_section_v1_ade_section_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SectionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SectionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - Basic Auth: []
      x-codeSamples:
      - lang: cURL
        label: cURL
        source: "curl -X POST 'https://api.va.landing.ai/v1/ade/section' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -F 'markdown=@parsed_output.md' \\\n  -F 'model=section-latest'"
      - lang: Python
        label: Python
        source: "import requests\n\nheaders = {\n    'Authorization': 'Bearer YOUR_API_KEY'\n}\n\nurl = 'https://api.va.landing.ai/v1/ade/section'\n\n# Prepare files and data\nfiles = {'markdown': open('parsed_output.md', 'rb')}\ndata = {\n    'model': 'section-latest'\n}\n\n# Run section classification\nresponse = requests.post(url, files=files, data=data, headers=headers)\n\n# Return the results\nprint(response.json())"
      - lang: JavaScript
        label: Node.js
        source: "const axios = require('axios');\nconst FormData = require('form-data');\nconst fs = require('fs');\n\nconst form = new FormData();\nform.append('markdown', fs.createReadStream('parsed_output.md'));\nform.append('model', 'section-latest');\n\naxios.post('https://api.va.landing.ai/v1/ade/section', form, {\n  headers: {\n    'Authorization': 'Bearer YOUR_API_KEY',\n    ...form.getHeaders()\n  }\n})\n.then(response => console.log(response.data))\n.catch(error => console.error(error));"
  /v1/ade/classify:
    post:
      tags:
      - Tools
      summary: ADE Classify
      description: 'Classify the pages of a document into classes you define.


        This endpoint accepts PDFs, images, and other supported file types

        (either as a `document` upload or `document_url`) together with a

        list of `classes`, and returns a classification result for each page.


        For EU users, use this endpoint:


        `https://api.va.eu-west-1.landing.ai/v1/ade/classify`.'
      operationId: tool_ade_classify_v1_ade_classify_post
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ClassifyRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClassifyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - Basic Auth: []
      x-codeSamples:
      - lang: cURL
        label: cURL
        source: "curl -X POST 'https://api.va.landing.ai/v1/ade/classify' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -F 'classes=[{\"class\":\"Class 1\",\"description\":\"Description of Class 1\"},{\"class\":\"Class 2\",\"description\":\"Description of Class 2\"}]' \\\n  -F 'document=@document.pdf'"
      - lang: Python
        label: Python
        source: "import requests\nimport json\n\nheaders = {\n    'Authorization': 'Bearer YOUR_API_KEY'\n}\n\nurl = 'https://api.va.landing.ai/v1/ade/classify'\n\nclasses = [\n    {'class': 'Class 1', 'description': 'Description of Class 1'},\n    {'class': 'Class 2', 'description': 'Description of Class 2'}\n]\n\nfiles = {'document': open('document.pdf', 'rb')}\ndata = {'classes': json.dumps(classes)}\n\nresponse = requests.post(url, files=files, data=data, headers=headers)\nprint(response.json())"
      - lang: JavaScript
        label: Node.js
        source: "const axios = require('axios');\nconst FormData = require('form-data');\nconst fs = require('fs');\n\nconst form = new FormData();\nform.append('document', fs.createReadStream('document.pdf'));\n\nconst classes = [\n  { class: 'Class 1', description: 'Description of Class 1' },\n  { class: 'Class 2', description: 'Description of Class 2' }\n];\nform.append('classes', JSON.stringify(classes));\n\naxios.post('https://api.va.landing.ai/v1/ade/classify', form, {\n  headers: {\n    'Authorization': 'Bearer YOUR_API_KEY',\n    ...form.getHeaders()\n  }\n})\n.then(response => console.log(response.data))\n.catch(error => console.error(error));"
  /v1/ade/parse/jobs:
    post:
      tags:
      - Tools
      summary: ADE Parse Jobs
      description: "Parse documents asynchronously.\n\nThis endpoint creates a job that handles the\n    processing for both large documents and large batches of documents.\n\n For EU\n    users, use this endpoint:\n\n\n    `https://api.va.eu-west-1.landing.ai/v1/ade/parse/jobs`."
      operationId: tool_ade_parse_jobs_v1_ade_parse_jobs_post
      security:
      - Basic Auth: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AsyncParseRequestWithEncryptedPassword'
      responses:
        '202':
          description: Job queued successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobCreationResponse'
              example:
                job_id: 12345678-1234-1234-1234-123456789012
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
      x-codeSamples:
      - lang: cURL
        label: cURL
        source: "curl -X POST 'https://api.va.landing.ai/v1/ade/parse/jobs' \\\n  -H 'Authorization: Bearer YOUR_API_KEY' \\\n  -F 'document=@document.pdf' \\\n  -F 'model=dpt-2-latest'  # Set the model (optional)"
      - lang: Python
        label: Python
        source: "import requests\nimport json\n\nheaders = {\n    'Authorization': 'Bearer YOUR_API_KEY'\n}\n\nurl = 'https://api.va.landing.ai/v1/ade/parse/jobs'\n\n# Set the model (optional)\ndata = {\n    'model': 'dpt-2-latest'\n}\n\n# Upload a document \ndocument = open('document.pdf', 'rb')\nfiles = {'document': document}\n\nresponse = requests.post(url, files=files, data=data, headers=headers)\nprint(response.json())"
      - lang: JavaScript
        label: Node.js
        source: "const axios = require('axios');\nconst FormData = require('form-data');\nconst fs = require('fs');\n\nconst form = new FormData();\nform.append('document', fs.createReadStream('document.pdf'));\n\n// Set the model (optional)\nform.append('model', 'dpt-2-latest');\n\naxios.post('https://api.va.landing.ai/v1/ade/parse/jobs', form, {\n  headers: {\n    'Authorization': 'Bearer YOUR_API_KEY',\n    ...form.getHeaders()\n  }\n})\n.then(response => console.log(response.data))\n.catch(error => console.error(error));"
    get:
      tags:
      - Tools
      summary: ADE List Parse Jobs
      description: 'List all async parse jobs associated with your API key. Returns the list of jobs

        or an error response. For EU users, use this endpoint:



        `https://api.va.eu-west-1.landing.ai/v1/ade/parse/jobs`.'
      operationId: tool_ade_list_parse_jobs_v1_ade_parse_jobs_get
      security:
      - Basic Auth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          description: Page number (0-indexed)
          default: 0
          title: Page
        description: Page number (0-indexed)
      - name: pageSize
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          description: Number of items per page
          default: 10
          title: Pagesize
        description: Number of items per page
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - enum:
            - cancelled
            - completed
            - failed
            - pending
            - processing
            type: string
          - type: 'null'
          description: Filter by job status.
          title: Status
        description: Filter by job status.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobsListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: cURL
        label: cURL
        source: "curl -X GET 'https://api.va.landing.ai/v1/ade/parse/jobs' \\\n  -H 'Authorization: Bearer YOUR_API_KEY'"
      - lang: Python
        label: Python
        source: "import requests\n\nheaders = {\n    'Authorization': 'Bearer YOUR_API_KEY'\n}\n\nurl = 'https://api.va.landing.ai/v1/ade/parse/jobs'\n\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
      - lang: JavaScript
        label: Node.js
        source: "const axios = require('axios');\n\nconst url = 'https://api.va.landing.ai/v1/ade/parse/jobs';\n\naxios.get(url, {\n  headers: {\n    'Authorization': 'Bearer YOUR_API_KEY'\n  }\n})\n.then(response => console.log(response.data))\n.catch(error => console.error(error));"
  /v1/ade/parse/jobs/{job_id}:
    get:
      tags:
      - Tools
      summary: ADE Get Parse Jobs
      description: "Get the status for an async parse job.\n\nReturns the job status or an error\n   response. For EU users, use this endpoint:\n\n\n   `https://api.va.eu-west-1.landing.ai/v1/ade/parse/jobs/{job_id}`."
      operationId: tool_ade_get_parse_jobs_v1_ade_parse_jobs__job_id__get
      security:
      - Basic Auth: []
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: string
          title: Job Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
        '206':
          description: There were some pages that failed to be parsed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
        '404':
          description: Job ID not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
      - lang: cURL
        label: cURL
        source: "curl -X GET 'https://api.va.landing.ai/v1/ade/parse/jobs/{job_id}' \\\n  -H 'Authorization: Bearer YOUR_API_KEY'"
      - lang: Python
        label: Python
        source: "import requests\n\nheaders = {\n    'Authorization': 'Bearer YOUR_API_KEY'\n}\n\nurl = f'https://api.va.landing.ai/v1/ade/parse/jobs/{job_id}'\n\nresponse = requests.get(url, headers=headers)\nprint(response.json())"
      - lang: JavaScript
        label: Node.js
        source: "const axios = require('axios');\n\nconst url = `https://api.va.landing.ai/v1/ade/parse/jobs/{jobId}`;\n\naxios.get(url, {\n  headers: {\n    'Authorization': 'Bearer YOUR_API_KEY'\n  }\n})\n.then(response => console.log(response.data))\n.catch(error => console.error(error));"
  /v1/tools/agentic-document-analysis:
    post:
      tags:
      - Tools
      summary: Agentic Document Extraction (Legacy)
      description: "This is a legacy endpoint. Use the ADE Parse endpoint instead.\n\nSend\n    documents to the Agentic Document Extraction API.\n\nThe API parses the\n    documents and returns the extracted data as structured Markdown and JSON.\n\nYou\n    can include an extraction schema to extract key-value pairs from the parsed\n    content.\n\nFor EU users, use this endpoint:\n\n\n    `https://api.va.eu-west-1.landing.ai/v1/tools/agentic-document-analysis`."
      operationId: tool_agentic_doc_analysis_v1_tools_agentic_document_analysis_post
      security:
      - Basic Auth: []
      parameters:
      - name: pages
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: 'Which pages to process, separated by commas and starting from 0. For example, to process the first 3 pages, use ''0,1,2''. '
          title: Pages
        description: 'Which pages to process, separa

# --- truncated at 32 KB (197 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/landingai/refs/heads/main/openapi/landingai-tools-api-openapi.yml