> ## Documentation Index
> Fetch the complete documentation index at: https://adp-doc.laiye.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create extraction application

> Create a standard or high-speed custom extraction application, and configure labels, fields, and extraction settings. Standard applications support parse_mode, source locations, PDF text first, stamp recognition, and related parsing settings. To create a high-speed custom extraction application, set ai_function to 1425 and provide field_key for fields and table sub-fields. High-speed applications do not support standard parsing settings.



## OpenAPI

````yaml /en/api-reference/adp-api.yaml post /open/agentic_doc_processor/{tenant_name}/v1/app-manage/create
openapi: 3.1.0
info:
  title: ADP API
  version: 1.0.0
  description: >-
    Laiye ADP OpenAPI reference for document extraction, document recognition,
    application management, credit usage, workflow runs, and workflow file
    management.
  license:
    name: MIT
    identifier: MIT
servers:
  - url: https://adp-global.laiye.com
    description: ADP global production endpoint
security: []
tags:
  - name: Document extraction
    description: Extract structured fields from uploaded documents.
  - name: Document recognition
    description: Recognize text, layout blocks, and positions from uploaded documents.
  - name: Application management
    description: >-
      Create, update, delete, and query extraction applications and
      configurations.
  - name: Account
    description: Query credit usage.
  - name: Workflow
    description: Run workflow applications and query run results.
  - name: Workflow files
    description: Upload and manage files used by workflow applications.
paths:
  /open/agentic_doc_processor/{tenant_name}/v1/app-manage/create:
    post:
      tags:
        - Application management
      summary: Create extraction application
      description: >-
        Create a standard or high-speed custom extraction application, and
        configure labels, fields, and extraction settings. Standard applications
        support parse_mode, source locations, PDF text first, stamp recognition,
        and related parsing settings. To create a high-speed custom extraction
        application, set ai_function to 1425 and provide field_key for fields
        and table sub-fields. High-speed applications do not support standard
        parsing settings.
      operationId: createExtractionApp
      parameters:
        - $ref: '#/components/parameters/TenantName'
      requestBody:
        $ref: '#/components/requestBodies/ExtractionAppCreateRequest'
      responses:
        '200':
          $ref: '#/components/responses/ExtractionAppResponse'
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    TenantName:
      name: tenant_name
      in: path
      required: true
      description: 'Tenant name. Default: laiye.'
      schema:
        type: string
        default: laiye
  requestBodies:
    ExtractionAppCreateRequest:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ExtractionAppCreateRequest'
          examples:
            standardCustomExtractionApp:
              summary: Create standard custom extraction application
              value:
                ai_function: 1406
                app_name: Purchase order extraction app
                app_label:
                  - purchase-order
                extract_fields:
                  - field_name: Order number
                    field_type: string
                    field_prompt: Extract the purchase order number.
                  - field_name: Order date
                    field_type: date
                    field_prompt: Extract the order date.
                parse_mode: standard
                enable_highlight: 1
                enable_pdf_parse: false
                pdf_pic_second_parsing: false
                enable_stamp_recognition: false
                enable_long_doc: false
            highSpeedCustomExtractionApp:
              summary: Create high-speed custom extraction application
              value:
                ai_function: 1425
                app_name: High-speed invoice extraction app
                app_label:
                  - invoice
                  - high-speed
                extract_fields:
                  - field_key: invoice_no
                    field_name: Invoice number
                    field_type: string
                    field_prompt: Extract the unique invoice number from the invoice.
                  - field_key: invoice_date
                    field_name: Invoice date
                    field_type: date
                    field_prompt: Extract the invoice issue date.
                  - field_key: line_items
                    field_name: Line items
                    field_type: table
                    sub_fields:
                      - field_key: item_name
                        field_name: Item name
                        field_type: string
                      - field_key: item_date
                        field_name: Date
                        field_type: date
                enable_field_value_translation: false
  responses:
    ExtractionAppResponse:
      description: Extraction application result.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ExtractionAppResponse'
          example:
            code: success
            message: ''
            tips: null
            data:
              app_id: app_abc123
              app_name: High-speed invoice extraction app
              app_label:
                - invoice
                - high-speed
              config_version: v1
    ValidationError:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SimpleResponse'
  schemas:
    ExtractionAppCreateRequest:
      description: >-
        Set ai_function first. Use the standard custom extraction application
        parameters when ai_function is 1406. Use the high-speed custom
        extraction application parameters when ai_function is 1425.
      discriminator:
        propertyName: ai_function
        mapping:
          '1406':
            $ref: '#/components/schemas/StandardExtractionAppCreateRequest'
          '1425':
            $ref: '#/components/schemas/HighSpeedExtractionAppCreateRequest'
      oneOf:
        - $ref: '#/components/schemas/StandardExtractionAppCreateRequest'
        - $ref: '#/components/schemas/HighSpeedExtractionAppCreateRequest'
    ExtractionAppResponse:
      allOf:
        - $ref: '#/components/schemas/SimpleResponse'
        - type: object
          properties:
            data:
              $ref: '#/components/schemas/AppConfigData'
    SimpleResponse:
      type: object
      properties:
        code:
          oneOf:
            - type: string
            - type: integer
          description: Business code. A successful response is usually success or 200.
        message:
          type: string
          description: Response message.
        tips:
          type:
            - string
            - 'null'
          description: Details. Defaults to null.
    StandardExtractionAppCreateRequest:
      type: object
      additionalProperties: false
      title: Create standard custom extraction application
      properties:
        ai_function:
          type: integer
          enum:
            - 1406
          default: 1406
          description: >-
            Application type. Use 1406 to create a standard custom extraction
            application. If omitted, the API handles the request as 1406 by
            default.
        app_name:
          type: string
          minLength: 1
          maxLength: 100
          description: Application name.
        app_label:
          type: array
          maxItems: 5
          description: Application labels. Up to 5 labels.
          items:
            type: string
        extract_fields:
          type: array
          maxItems: 20
          description: Extraction field configuration list. Up to 20 fields.
          items:
            $ref: '#/components/schemas/ExtractionFieldConfig'
        parse_mode:
          type: string
          enum:
            - standard
            - advance
            - fast_vlm
            - agentic
          description: >
            Parsing mode. Required for standard custom extraction applications.
            Mode capabilities match the Web parsing configuration:


            - standard: Standard parsing for clear digital documents. Supports
            source locations, PDF text first, and stamp recognition.

            - advance: Enhanced parsing 1.0 for documents with stamps,
            signatures, multiple tables, or moderately complex layouts. Source
            locations are not supported.

            - fast_vlm: Enhanced parsing 2.0 for complex layouts, scanned files,
            and multi-table documents. Supports source locations, PDF text
            first, and stamp recognition.

            - agentic: Smart parsing that combines multiple models for complex
            documents. Supports source locations, PDF text first, and stamp
            recognition.
        enable_highlight:
          type: integer
          enum:
            - 0
            - 1
          default: 1
          description: >-
            Whether to include source locations. Pass 1 to enable or 0 to
            disable. Supported by standard, fast_vlm, and agentic. Not supported
            by advance.
        enable_pdf_parse:
          type: boolean
          default: false
          description: >-
            Whether to prefer PDF text extraction. Use this for digital PDFs
            with selectable text to improve processing speed and text stability.
        pdf_pic_second_parsing:
          type: boolean
          default: false
          description: >-
            When PDF text extraction is enabled, whether to run secondary
            parsing on images inside the PDF.
        enable_stamp_recognition:
          type: boolean
          default: false
          description: >-
            Whether to enable stamp recognition. The service attempts to
            recognize stamp information in the document. Stamp recognition
            capability must be enabled.
        enable_field_value_translation:
          type: boolean
          default: false
          description: Whether to enable extracted value translation. Disabled by default.
        enable_long_doc:
          type: boolean
          default: false
          description: Whether to enable long document support.
        long_doc_config:
          type: array
          maxItems: 5
          description: Long document configuration. Used only when enable_long_doc is true.
          items:
            $ref: '#/components/schemas/LongDocConfig'
      required:
        - ai_function
        - app_name
        - extract_fields
        - parse_mode
    HighSpeedExtractionAppCreateRequest:
      type: object
      additionalProperties: false
      title: Create high-speed extraction application
      properties:
        ai_function:
          type: integer
          enum:
            - 1425
          default: 1425
          description: >-
            Application type. Use 1425 to create a high-speed custom extraction
            application.
        app_name:
          type: string
          minLength: 1
          maxLength: 100
          description: Application name.
        app_label:
          type: array
          maxItems: 5
          description: Application labels. Up to 5 labels.
          items:
            type: string
        extract_fields:
          type: array
          minItems: 1
          maxItems: 20
          description: >-
            High-speed extraction field configuration list. Up to 20 fields.
            Every field must provide field_key.
          items:
            $ref: '#/components/schemas/HighSpeedExtractionFieldConfig'
        enable_field_value_translation:
          type: boolean
          default: false
          description: Whether to enable extracted value translation. Disabled by default.
      required:
        - ai_function
        - app_name
        - extract_fields
    AppConfigData:
      type: object
      additionalProperties: true
      properties:
        app_id:
          type: string
        app_name:
          type: string
        app_label:
          type: array
          items:
            type: string
        config_version:
          type: string
        extract_fields:
          type: array
          items:
            $ref: '#/components/schemas/ExtractionFieldConfig'
        parse_mode:
          type:
            - string
            - 'null'
          description: Parsing mode. High-speed applications return null.
        enable_highlight:
          type:
            - integer
            - 'null'
          enum:
            - 0
            - 1
            - null
          description: >-
            Whether source locations are enabled. Standard applications return 0
            or 1. High-speed applications return null.
        enable_pdf_parse:
          type:
            - boolean
            - 'null'
          description: >-
            Whether PDF text first is enabled. High-speed applications return
            null.
        pdf_pic_second_parsing:
          type:
            - boolean
            - 'null'
          description: >-
            When PDF text first is enabled, whether to run secondary parsing on
            images inside the PDF. High-speed applications return null.
        enable_stamp_recognition:
          type:
            - boolean
            - 'null'
          description: >-
            Whether stamp recognition is enabled. High-speed applications return
            null.
        enable_long_doc:
          type: boolean
        long_doc_config:
          type: array
          items:
            $ref: '#/components/schemas/LongDocConfig'
    ExtractionFieldConfig:
      type: object
      additionalProperties: false
      properties:
        field_key:
          type: string
          pattern: ^[A-Za-z][A-Za-z0-9_]{0,63}$
          description: >-
            Unique field identifier. Required when you create a high-speed
            custom extraction application. Standard applications do not require
            this field.
        field_name:
          type: string
          minLength: 1
          maxLength: 50
          description: Field name.
        field_type:
          type: string
          enum:
            - string
            - date
            - table
          description: Field type. Use table for table fields.
        field_prompt:
          type: string
          description: Field extraction prompt.
        sub_fields:
          type: array
          description: >-
            Table sub-fields. When field_type is table, provide at least one
            valid sub-field.
          items:
            $ref: '#/components/schemas/ExtractionSubFieldConfig'
      required:
        - field_name
        - field_type
    LongDocConfig:
      type: object
      additionalProperties: false
      properties:
        doc_type:
          type: string
          description: Document type.
        doc_desc:
          type: string
          description: Document type description.
      required:
        - doc_type
    HighSpeedExtractionFieldConfig:
      type: object
      additionalProperties: false
      title: High-speed field
      description: >-
        High-speed field configuration. For ordinary fields, set field_type to
        string or date and do not pass sub_fields. For table fields, set
        field_type to table and pass sub_fields.
      properties:
        field_key:
          type: string
          pattern: ^[A-Za-z][A-Za-z0-9_]{0,63}$
          description: >-
            Unique field identifier. It must start with an English letter and
            can contain only English letters, numbers, and underscores. Maximum
            64 characters.
        field_name:
          type: string
          minLength: 1
          maxLength: 50
          description: Field name.
        field_type:
          type: string
          enum:
            - string
            - date
            - table
          description: >-
            Field type. Use string or date for ordinary fields. Use table for
            table fields.
        field_prompt:
          type: string
          maxLength: 200
          description: Field extraction prompt.
        sub_fields:
          type: array
          maxItems: 50
          description: >-
            Table sub-fields. Fill this only when field_type is table, and
            provide at least one valid sub-field. Do not pass this parameter for
            ordinary fields.
          items:
            $ref: '#/components/schemas/HighSpeedExtractionSubFieldConfig'
          examples:
            - - field_key: item_name
                field_name: Item name
                field_type: string
      required:
        - field_key
        - field_name
        - field_type
      allOf:
        - if:
            properties:
              field_type:
                const: table
            required:
              - field_type
          then:
            required:
              - sub_fields
            properties:
              sub_fields:
                minItems: 1
    ExtractionSubFieldConfig:
      type: object
      additionalProperties: false
      properties:
        field_key:
          type: string
          pattern: ^[A-Za-z][A-Za-z0-9_]{0,63}$
          description: >-
            Unique sub-field identifier. Required when you create a high-speed
            custom extraction application. Standard applications do not require
            this field.
        field_name:
          type: string
          minLength: 1
          maxLength: 50
          description: Sub-field name.
        field_type:
          type: string
          enum:
            - string
            - date
          description: Sub-field type. Nested tables are not supported inside a table.
        field_prompt:
          type: string
          description: Sub-field extraction prompt.
      required:
        - field_name
        - field_type
    HighSpeedExtractionSubFieldConfig:
      type: object
      additionalProperties: false
      properties:
        field_key:
          type: string
          pattern: ^[A-Za-z][A-Za-z0-9_]{0,63}$
          description: >-
            Unique sub-field identifier. It must start with an English letter
            and can contain only English letters, numbers, and underscores.
            Maximum 64 characters.
        field_name:
          type: string
          minLength: 1
          maxLength: 50
          description: Sub-field name.
        field_type:
          type: string
          enum:
            - string
            - date
          description: Sub-field type. Nested tables are not supported inside a table.
        field_prompt:
          type: string
          maxLength: 200
          description: Sub-field extraction prompt.
      required:
        - field_key
        - field_name
        - field_type
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Production OpenAPI Accessor access_key. You can find it in My API in the
        ADP platform. If the key is disabled, expired, or does not belong to the
        production environment, the API returns Accessor not found.

````