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

> 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`.



## OpenAPI

````yaml /ade/va_openapi_ade2.json post /v1/ade/section
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/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' \
              -H 'Authorization: Bearer YOUR_API_KEY' \
              -F 'markdown=@parsed_output.md' \
              -F 'model=section-latest'
        - lang: Python
          label: Python
          source: >-
            import requests


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


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


            # Prepare files and data

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

            data = {
                'model': 'section-latest'
            }


            # Run section 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('parsed_output.md'));
            form.append('model', 'section-latest');

            axios.post('https://api.va.landing.ai/v1/ade/section', form, {
              headers: {
                'Authorization': 'Bearer YOUR_API_KEY',
                ...form.getHeaders()
              }
            })
            .then(response => console.log(response.data))
            .catch(error => console.error(error));
components:
  schemas:
    SectionRequest:
      properties:
        markdown:
          anyOf:
            - type: string
              format: binary
            - type: string
            - type: 'null'
          title: Markdown
          description: >-
            Parsed markdown with reference anchors (<a id='...'></a>). This is
            the markdown field from a parse response.
        markdown_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Markdown Url
          description: URL to fetch the markdown from.
        guidelines:
          anyOf:
            - type: string
            - type: 'null'
          title: Guidelines
          description: >-
            Natural-language instructions to control hierarchy. Examples: 'Group
            by topic', 'Treat each numbered section as a top-level entry'.
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: Section model version. Defaults to latest.
      type: object
      title: SectionRequest
      description: Request model for section endpoint.
    SectionResponse:
      properties:
        table_of_contents:
          items:
            $ref: '#/components/schemas/SectionTOCEntry'
          type: array
          title: Table Of Contents
        table_of_contents_md:
          type: string
          title: Table Of Contents Md
        metadata:
          $ref: '#/components/schemas/SectionMetadata'
      type: object
      required:
        - table_of_contents
        - table_of_contents_md
        - metadata
      title: SectionResponse
      description: Response model for section endpoint.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SectionTOCEntry:
      properties:
        title:
          type: string
          title: Title
        level:
          type: integer
          title: Level
        section_number:
          type: string
          title: Section Number
        start_reference:
          type: string
          title: Start Reference
      type: object
      required:
        - title
        - level
        - section_number
        - start_reference
      title: SectionTOCEntry
      description: A single entry in the flat table of contents.
    SectionMetadata:
      properties:
        filename:
          type: string
          title: Filename
        org_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Org Id
        duration_ms:
          type: integer
          title: Duration Ms
        credit_usage:
          type: number
          title: Credit Usage
        job_id:
          type: string
          title: Job Id
          default: ''
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
      type: object
      required:
        - filename
        - duration_ms
        - credit_usage
      title: SectionMetadata
      description: Public metadata for section 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

````