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

> Split a Markdown document into segments and return the split response inline.



## OpenAPI

````yaml /dpt3/openapi-adev2.json post /v1/split
openapi: 3.1.0
info:
  title: >-
    LandingAI Agentic Document Extraction (ADE) Gen2 API: Parse, Extract, and
    Ground 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. Ground maps extracted fields back to the source blocks,
    with page numbers and bounding boxes for each value. Documentation:
    https://docs.landing.ai
  version: 1.0.0
servers:
  - url: https://api.ade.landing.ai
    description: Production API
security: []
paths:
  /v1/split:
    post:
      tags:
        - Split
      summary: ADE Split
      description: >-
        Split a Markdown document into segments and return the split response
        inline.
      operationId: v1-split_run_sync
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - split_class
              properties:
                markdown:
                  anyOf:
                    - type: string
                      format: binary
                    - type: string
                  description: >-
                    Markdown content to split, as an inline string or an
                    uploaded file. Provide either `markdown` or `markdown_url`,
                    not both.
                markdown_url:
                  type: string
                  description: >-
                    A publicly accessible URL to the Markdown file to split.
                    Provide either `markdown` or `markdown_url`, not both.
                split_class:
                  type: string
                  description: >-
                    The split classification entries, as a JSON-encoded array of
                    objects with `name` (required), `description`, and
                    `identifier` keys. At most 19 entries. Sent as a
                    JSON-serialized string in form data.
                model:
                  type: string
                  description: >-
                    The split model version to use. Accepts `split-latest`,
                    `split`, or a dated snapshot. Defaults to the latest
                    snapshot. The resolved version is echoed back as
                    `metadata.version`.
      responses:
        '200':
          description: The split response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SplitResponse'
        '422':
          description: Request validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1LegacyErrorResponse'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl -X POST 'https://api.ade.landing.ai/v1/split' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -F 'markdown=@parse-output.md' \
              -F 'split_class=[{"name":"Bank Statement","description":"Document from a bank that summarizes all account activity over a period of time."},{"name":"Pay Stub","description":"Document that details an employee'\''s earnings, deductions, and net pay for a specific pay period.","identifier":"Pay Stub Date"}]'
        - lang: Python
          label: Python
          source: >-
            import json

            import requests


            url = 'https://api.ade.landing.ai/v1/split'

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


            files = {'markdown': open('parse-output.md', 'rb')}

            data = {'split_class': json.dumps([{"name": "Bank Statement",
            "description": "Document from a bank that summarizes all account
            activity over a period of time."}, {"name": "Pay Stub",
            "description": "Document that details an employee's earnings,
            deductions, and net pay for a specific pay period.", "identifier":
            "Pay Stub Date"}])}


            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('markdown', fs.createReadStream('parse-output.md'));

            form.append('split_class', JSON.stringify([{"name": "Bank
            Statement", "description": "Document from a bank that summarizes all
            account activity over a period of time."}, {"name": "Pay Stub",
            "description": "Document that details an employee's earnings,
            deductions, and net pay for a specific pay period.", "identifier":
            "Pay Stub Date"}]));


            axios.post('https://api.ade.landing.ai/v1/split', form, {
              headers: { 'Authorization': 'Bearer YOUR_API_KEY', ...form.getHeaders() }
            })
              .then(response => console.log(response.data))
              .catch(error => console.error(error));
components:
  schemas:
    SplitResponse:
      description: 'The split result: the merged `splits` segments and request `metadata`.'
      properties:
        splits:
          description: >-
            The split segments, in page order. Consecutive pages with the same
            classification merge into one segment; an identifier change starts a
            new segment.
          items:
            $ref: '#/components/schemas/Split'
          title: Splits
          type: array
        metadata:
          $ref: '#/components/schemas/SplitMetadata'
          description: >-
            Information about the request: file name, page count, duration,
            credits, and the resolved model version.
      required:
        - splits
        - metadata
      title: SplitResponse
      type: object
    V1LegacyErrorResponse:
      title: V1LegacyErrorResponse
      description: >-
        The v1 error envelope: `message` for a request-validation failure and
        for an authentication, payment or permission rejection (401/402/403),
        `error` for every other rejection, never both. `code` is always present.
      oneOf:
        - type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable snake_case error code.
            message:
              type: string
              description: Human-readable detail.
        - type: object
          required:
            - code
            - error
          properties:
            code:
              type: string
              description: Stable snake_case error code.
            error:
              type: string
              description: Human-readable detail.
    Split:
      description: |-
        One split segment: consecutive pages of one classification (an
        identifier change starts a new segment).
      properties:
        classification:
          description: The split classification name this segment was assigned.
          title: Classification
          type: string
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The identifier value extracted for this segment, when the matching
            split classification requested one. Null otherwise.
          title: Identifier
        pages:
          description: 0-indexed page numbers belonging to this segment, in order.
          items:
            type: integer
          title: Pages
          type: array
        markdowns:
          description: The Markdown content of each page in this segment, in order.
          items:
            type: string
          title: Markdowns
          type: array
      required:
        - classification
        - identifier
        - pages
        - markdowns
      title: Split
      type: object
    SplitMetadata:
      description: Information about a split request.
      properties:
        filename:
          description: >-
            Display name of the split document: the uploaded file's name for
            `markdown` file uploads (`.md` is appended when the name has no
            suffix), the URL path's file name for `markdown_url` inputs, or a
            generated name for inline Markdown.
          title: Filename
          type: string
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          description: Organization ID.
          title: Org Id
        page_count:
          description: Total number of pages in the input Markdown.
          title: Page Count
          type: integer
        duration_ms:
          description: Total processing time in milliseconds.
          title: Duration Ms
          type: integer
        credit_usage:
          description: >-
            Credits consumed by this request: the input Markdown length in
            characters divided by 5000. Billed usage rounds this up to the next
            0.1 credit.
          title: Credit Usage
          type: number
        job_id:
          description: >-
            The split job identifier for this request. When present it is the id
            of the request's entry in your billing dashboard — whichever stack
            served it — so it is the one to quote for this run. Empty when the
            serving stack reported no id, in which case there is no billing
            entry to quote.
          title: Job Id
          type: string
        version:
          description: The exact split model snapshot that processed the document.
          title: Version
          type: string
      required:
        - filename
        - org_id
        - page_count
        - duration_ms
        - credit_usage
        - job_id
        - version
      title: SplitMetadata
      type: object

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.