Landing.ai Classes API

The Classes API from Landing.ai — 1 operation(s) for classes.

OpenAPI Specification

landingai-classes-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: 'LandingAI Agentic Document Extraction (ADE) API v1: Parse, Extract, Classify, Split, Section Classes 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: Classes
paths:
  /v1/projects/{project_id}/classes:
    post:
      tags:
      - Classes
      summary: Create Classes
      operationId: create_classes_v1_projects__project_id__classes_post
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: integer
          title: Project Id
      - name: timeout
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          default: 60
          title: Timeout
      - name: apikey
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apikey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/ClassMap'
              title: Classes
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefectClassResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Classes
      summary: Get Classes
      operationId: get_classes_v1_projects__project_id__classes_get
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: integer
          title: Project Id
      - name: timeout
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          default: 60
          title: Timeout
      - name: apikey
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Apikey
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefectClassResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    LabelClass:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        index:
          type: integer
          title: Index
        color:
          anyOf:
          - type: string
          - type: 'null'
          title: Color
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
      type: object
      required:
      - id
      - name
      - index
      - color
      - description
      title: LabelClass
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
    DefectClassResponse:
      properties:
        data:
          anyOf:
          - items:
              $ref: '#/components/schemas/LabelClass'
            type: array
          - type: 'null'
          title: Data
      type: object
      required:
      - data
      title: DefectClassResponse
    ClassMap:
      properties:
        name:
          type: string
          title: Name
        color:
          anyOf:
          - type: string
          - type: 'null'
          title: Color
        description:
          type: string
          title: Description
          default: ''
      type: object
      required:
      - name
      title: ClassMap
  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