> ## 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 classification for documents.

This endpoint classifies document sections
    based on markdown content and split options.

For EU users, use this endpoint:


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



## OpenAPI

````yaml /ade/va_openapi_ade2.json post /v1/ade/split
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/split:
    post:
      tags:
        - Tools
      summary: ADE Split
      description: |-
        Split classification for documents.

        This endpoint classifies document sections
            based on markdown content and split options.

        For EU users, use this endpoint:


            `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' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -F 'markdown=@markdown.md' \
              -F 'split_class=[{"name": "split type name", "description": "description of split type", "identifier": "unique identifier field"}]' \
              -F 'model=split-latest'
        - lang: Python
          label: Python
          source: >-
            import requests

            import json


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


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


            # Prepare split classes

            split_class = [
                {
                    'name': 'split type name',
                    'description': 'description of split type',
                    'identifier': 'unique identifier field'
                }
            ]


            # Prepare files and data

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

            data = {
                'split_class': json.dumps(split_class),
                'model': 'split-latest'
            }


            # Run split classification

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


            # Return the results

            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('markdown.md'));

            const splitClass = [
              {
                name: 'split type name',
                description: 'description of split type',
                identifier: 'unique identifier field'
              }
            ];

            form.append('split_class', JSON.stringify(splitClass));
            form.append('model', 'split-latest');

            axios.post('https://api.va.landing.ai/v1/ade/split', form, {
              headers: {
                'Authorization': 'Bearer YOUR_API_KEY',
                ...form.getHeaders()
              }
            })
            .then(response => console.log(response.data))
            .catch(error => console.error(error));
components:
  schemas:
    SplitRequest:
      properties:
        markdown:
          anyOf:
            - type: string
              format: binary
            - type: string
            - type: 'null'
          title: Markdown
          description: The Markdown file or Markdown content to split.
        markdown_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Markdown Url
          description: The URL to the Markdown file to split.
        split_class:
          items:
            $ref: '#/components/schemas/SplitClass'
          type: array
          title: Split Class
          description: >-
            List of split classification options/configuration. Can be provided
            as JSON string in form data.
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: >-
            Model version to use for split classification. Defaults to the
            latest version.
          default: split-20251105
      type: object
      required:
        - split_class
      title: SplitRequest
      description: Request model for split classification endpoint.
    SplitResponse:
      properties:
        splits:
          items:
            $ref: '#/components/schemas/SplitData'
          type: array
          title: Splits
        metadata:
          $ref: '#/components/schemas/SplitMetadata'
      type: object
      required:
        - splits
        - metadata
      title: SplitResponse
      description: Response model for split classification endpoint.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SplitClass:
      properties:
        name:
          type: string
          title: Name
          description: Name of the split classification type
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Detailed description of what this split type represents
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
          description: Identifier to partition/group the splits by
      type: object
      required:
        - name
      title: SplitClass
      description: Model for split classification option.
    SplitData:
      properties:
        classification:
          type: string
          title: Classification
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
        pages:
          items:
            type: integer
          type: array
          title: Pages
        markdowns:
          items:
            type: string
          type: array
          title: Markdowns
      type: object
      required:
        - classification
        - identifier
        - pages
        - markdowns
      title: SplitData
      description: Split data for split classification endpoint.
    SplitMetadata:
      properties:
        filename:
          type: string
          title: Filename
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Id
          description: Organization ID
        page_count:
          type: integer
          title: Page Count
        duration_ms:
          type: integer
          title: Duration Ms
        credit_usage:
          type: number
          title: Credit Usage
        job_id:
          type: string
          title: Job Id
          description: Inference history job ID
          default: ''
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
          description: Model version used for split classification
      type: object
      required:
        - filename
        - page_count
        - duration_ms
        - credit_usage
      title: SplitMetadata
      description: Metadata for split classification response.
    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

````