> ## 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 Jobs

> Parse documents asynchronously.

This endpoint creates a job that handles the
    processing for both large documents and large batches of documents.

 For EU
    users, use this endpoint:


    `https://api.va.eu-west-1.landing.ai/v1/ade/parse/jobs`.



## OpenAPI

````yaml /ade/va_openapi_ade2.json post /v1/ade/parse/jobs
openapi: 3.1.0
info:
  title: Vision Tools API
  version: 0.1.0
servers:
  - url: https://api.va.landing.ai
    description: Production vision tools API
security: []
paths:
  /v1/ade/parse/jobs:
    post:
      tags:
        - Tools
      summary: ADE Parse Jobs
      description: |-
        Parse documents asynchronously.

        This endpoint creates a job that handles the
            processing for both large documents and large batches of documents.

         For EU
            users, use this endpoint:


            `https://api.va.eu-west-1.landing.ai/v1/ade/parse/jobs`.
      operationId: tool_ade_parse_jobs_v1_ade_parse_jobs_post
      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
      security:
        - Basic Auth: []
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl -X POST 'https://api.va.landing.ai/v1/ade/parse/jobs' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -F 'document=@document.pdf' \
              -F 'model=dpt-2-latest'  # Set the model (optional)
        - lang: Python
          label: Python
          source: >-
            import requests

            import json


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


            url = 'https://api.va.landing.ai/v1/ade/parse/jobs'


            # Set the model (optional)

            data = {
                'model': 'dpt-2-latest'
            }


            # Upload a document 

            document = open('document.pdf', 'rb')

            files = {'document': document}


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

            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'));

            // Set the model (optional)
            form.append('model', 'dpt-2-latest');

            axios.post('https://api.va.landing.ai/v1/ade/parse/jobs', form, {
              headers: {
                'Authorization': 'Bearer YOUR_API_KEY',
                ...form.getHeaders()
              }
            })
            .then(response => console.log(response.data))
            .catch(error => console.error(error));
components:
  schemas:
    AsyncParseRequestWithEncryptedPassword:
      properties:
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: The version of the model to use for parsing.
        document:
          anyOf:
            - type: string
              format: binary
            - type: 'null'
          title: Document
          description: >-
            A file to be parsed. The file can be a PDF or an image. See the list
            of supported file types here:
            https://docs.landing.ai/ade/ade-file-types. Either this parameter or
            the `document_url` parameter must be provided.
        document_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Document Url
          description: >-
            The URL to the file to be parsed. The file can be a PDF or an image.
            See the list of supported file types here:
            https://docs.landing.ai/ade/ade-file-types. Either this parameter or
            the `document` parameter must be provided.
        split:
          anyOf:
            - $ref: '#/components/schemas/SplitType'
            - type: 'null'
          description: >-
            If you want to split documents into smaller sections, include the
            split parameter. Set the parameter to page to split documents at the
            page level. The splits object in the API output will contain a set
            of data for each page.
        password:
          anyOf:
            - type: string
            - type: 'null'
          title: Password
          description: >-
            Password for encrypted document files. If the document is
            password-protected, provide the password to decrypt and process the
            document. Ignored for unencrypted documents.
        custom_prompts:
          anyOf:
            - type: string
              contentMediaType: application/json
              contentSchema:
                $ref: '#/components/schemas/CustomPrompts'
            - type: 'null'
          title: Custom Prompts
          description: >-
            Optional JSON string mapping chunk types to custom parsing prompts.
            Only the `figure` key is supported, for example '{"figure":"Describe
            axis labels in detail."}'.
        output_save_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Save Url
          description: >-
            If zero data retention (ZDR) is enabled, you must enter a URL for
            the parsed output to be saved to. When ZDR is enabled, the parsed
            content will not be in the API response.
      type: object
      title: AsyncParseRequestWithEncryptedPassword
    JobCreationResponse:
      properties:
        job_id:
          type: string
          title: Job Id
      type: object
      required:
        - job_id
      title: JobCreationResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SplitType:
      type: string
      enum:
        - page
      const: page
      title: SplitType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    Basic Auth:
      type: http
      description: >-
        Your unique API key for authentication.


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


        If using the EU endpoint, get your API key here:
        https://va.eu-west-1.landing.ai/settings/api-key.
      scheme: bearer
      bearerFormat: Basic

````