Landing.ai Metadata API

The Metadata API from Landing.ai — 2 operation(s) for metadata.

OpenAPI Specification

landingai-metadata-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: 'LandingAI Agentic Document Extraction (ADE) API v1: Parse, Extract, Classify, Split, Section Classes Metadata 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: Metadata
paths:
  /v1/projects/{project_id}/metadata:
    get:
      tags:
      - Metadata
      summary: Get Project Metadata
      operationId: get_project_metadata_v1_projects__project_id__metadata_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/BaseResponse_list_MetadataItem__'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Metadata
      summary: Create Metadata
      operationId: create_metadata_v1_projects__project_id__metadata_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:
              $ref: '#/components/schemas/MetadataCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_MetadataItem_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/projects/{project_id}/metadata/{metadata_id}:
    post:
      tags:
      - Metadata
      summary: Update Metadata
      operationId: update_metadata_v1_projects__project_id__metadata__metadata_id__post
      parameters:
      - name: metadata_id
        in: path
        required: true
        schema:
          type: integer
          title: Metadata Id
      - 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:
              $ref: '#/components/schemas/MetadataUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_MetadataItem_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MetadataCreate:
      properties:
        name:
          type: string
          title: Name
        type:
          $ref: '#/components/schemas/MetadataType'
        allowMultiple:
          type: boolean
          title: Allowmultiple
        predefinedChoices:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Predefinedchoices
      type: object
      required:
      - name
      - type
      - allowMultiple
      - predefinedChoices
      title: MetadataCreate
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MetadataItem:
      properties:
        name:
          type: string
          title: Name
        type:
          $ref: '#/components/schemas/MetadataType'
        allowMultiple:
          type: boolean
          title: Allowmultiple
        predefinedChoices:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Predefinedchoices
        id:
          type: integer
          title: Id
        valueFlexible:
          type: boolean
          title: Valueflexible
      type: object
      required:
      - name
      - type
      - allowMultiple
      - predefinedChoices
      - id
      - valueFlexible
      title: MetadataItem
    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
    BaseResponse_list_MetadataItem__:
      properties:
        data:
          anyOf:
          - items:
              $ref: '#/components/schemas/MetadataItem'
            type: array
          - type: 'null'
          title: Data
      type: object
      required:
      - data
      title: BaseResponse[list[MetadataItem]]
    BaseResponse_MetadataItem_:
      properties:
        data:
          anyOf:
          - $ref: '#/components/schemas/MetadataItem'
          - type: 'null'
      type: object
      required:
      - data
      title: BaseResponse[MetadataItem]
    MetadataType:
      type: string
      enum:
      - text
      - number
      - boolean
      title: MetadataType
    MetadataUpdate:
      properties:
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        allowMultiple:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Allowmultiple
        predefinedChoicesAppend:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Predefinedchoicesappend
        valueFlexible:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Valueflexible
      type: object
      required:
      - allowMultiple
      - predefinedChoicesAppend
      - valueFlexible
      title: MetadataUpdate
  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