> ## 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 document recognition task

> Create an async document recognition task and return task_id immediately.



## OpenAPI

````yaml en/api-reference/adp-api.yaml POST /open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/create/task
openapi: 3.1.0
info:
  title: ADP API
  version: 1.0.0
  description: >-
    Laiye ADP OpenAPI reference for document extraction, recognition, and
    conversion; extraction application management; webhooks; human
    collaboration; credit usage; workflow discovery, runs, exports, and 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: Document conversion
    description: >-
      Convert PDFs, Office documents, OFD files, and images into page images or
      native spreadsheet structures.
  - name: Application management
    description: >-
      Create, update, delete, and query extraction applications and
      configurations.
  - name: Webhook
    description: List system events and manage event callbacks.
  - name: Account
    description: Query credit usage.
  - name: Workflow
    description: >-
      List business workflow templates, run workflow applications, and query run
      results.
  - name: Workflow files
    description: Upload and manage files used by workflow applications.
  - name: Human collaboration
    description: >-
      Configure review triggers, query collaboration tasks, and submit human
      corrections.
paths:
  /open/agentic_doc_processor/{tenant_name}/v1/app/doc/recognize/create/task:
    post:
      tags:
        - Document recognition
      summary: Create document recognition task
      description: >-
        Create an async document recognition task and return task_id
        immediately.
      operationId: createDocumentRecognizeTask
      parameters:
        - $ref: '#/components/parameters/TenantName'
        - $ref: '#/components/parameters/AcceptLanguage'
      requestBody:
        $ref: '#/components/requestBodies/DocumentFileRequest'
      responses:
        '200':
          $ref: '#/components/responses/TaskCreateResponse'
        '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
    AcceptLanguage:
      name: accept-language
      in: header
      required: false
      description: Field name language. Use zh for Chinese or en for English.
      schema:
        type: string
        enum:
          - zh
          - en
        default: en
  requestBodies:
    DocumentFileRequest:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DocumentFileRequest'
          examples:
            fileUrl:
              $ref: '#/components/examples/DocumentRecognitionFileUrl'
            fileBase64:
              $ref: '#/components/examples/DocumentRecognitionFileBase64'
  responses:
    TaskCreateResponse:
      description: Task creation result.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/SimpleResponse'
              - type: object
                properties:
                  data:
                    type: object
                    properties:
                      task_id:
                        type: string
                      metadata:
                        type: object
                        additionalProperties: true
                        description: Document processing task metadata.
                        properties:
                          collaboration_task_id:
                            type:
                              - string
                              - 'null'
                            description: >-
                              Collaboration task primary ID when enabled, used
                              for task queries and file_task_id. Distinct from
                              the outer task_id.
          example:
            code: success
            message: ''
            data:
              task_id: 94fe9b74e0e311f091505e345594c618
              metadata: {}
    ValidationError:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HTTPValidationError'
          example:
            detail:
              - type: greater_than
                loc:
                  - query
                  - limit
                msg: Input should be greater than 0
                input: 0
                ctx:
                  gt: 0
  schemas:
    DocumentFileRequest:
      oneOf:
        - title: Use file URL
          type: object
          additionalProperties: false
          properties:
            app_id:
              default: ootb_k7m2x9p4v1n8w3q6r5t0y2b4
              type: string
              description: Unique application ID.
            file_url:
              default: >-
                https://adp.laiye.com/web/agentic_doc_processor/laiye/file/2003c711818811f1a36200163e358400
              type: string
              format: uri
              description: File URL. Use either file_url or file_base64.
            file_name:
              type: string
              description: >-
                File name. Provide it when using Base64 or when the file name
                cannot be inferred from the URL.
            model_params:
              $ref: '#/components/schemas/DocumentRecognizeModelParams'
          required:
            - app_id
            - file_url
        - title: Use file Base64
          type: object
          additionalProperties: false
          properties:
            app_id:
              default: ootb_k7m2x9p4v1n8w3q6r5t0y2b4
              type: string
              description: Unique application ID.
            file_base64:
              default: >-
                data:image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U+ukhj28HfLtqyLMQURfTBD7hJPX1dta+Ned/5zcd6PTrfxvlZwOLzFIsL9XHSyWT/wBXaW1I0kn9AxjsPAXYAHPaGByMaYynblrNSxTdUDIW9yYqpWPqGtLoHvonZA8cen8bmKDk3auOllsHdu2tqRpJP6BjA0PAXYAHNdP05dWLHY6y9U43Gy+5G6FvdlADBVYa0vZu5BO9fG+bMfgchGMXTuS1mo4p+qF4y3uTdKlU6gRpdA99E7IHjnSx+Mkit5WxbKO12UdPST2iVAqqe3nfUf8A25zcfgchGMXTuS1mo4p+qF4y3uTdKlU6gRpdA99E7IHjnUxePlrX8nbssjSW5gU6CT0xKoCg9vO+o/7zpcccccccccccccccc//Z
              type: string
              description: Base64-encoded file. Use either file_base64 or file_url.
            file_name:
              type: string
              description: >-
                File name. Provide it when using Base64 or when the file name
                cannot be inferred from the URL.
            model_params:
              $ref: '#/components/schemas/DocumentRecognizeModelParams'
          required:
            - app_id
            - file_base64
    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.
    HTTPValidationError:
      type: object
      description: FastAPI/Pydantic request validation error.
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorItem'
      required:
        - detail
    DocumentRecognizeModelParams:
      type: object
      additionalProperties: true
      description: >
        Model parameters for this document recognition call. If omitted, the
        saved application parsing configuration is used. To temporarily override
        parsing options for this call, pass them in recognize_config.
      properties:
        recognize_config:
          $ref: '#/components/schemas/DocumentRecognizeConfig'
    ValidationErrorItem:
      type: object
      additionalProperties: true
      properties:
        type:
          type: string
          description: Validation error type.
        loc:
          type: array
          description: Location of the invalid field in the request.
          items:
            oneOf:
              - type: string
              - type: integer
        msg:
          type: string
          description: Human-readable validation error message.
        input:
          description: Input value that failed validation.
        ctx:
          type: object
          additionalProperties: true
          description: Additional context supplied by the validator.
        url:
          type: string
          format: uri
          description: Link to the Pydantic error documentation.
      required:
        - type
        - loc
        - msg
    DocumentRecognizeConfig:
      type: object
      additionalProperties: false
      description: Parsing configuration for this call.
      properties:
        recognize_mode:
          type: string
          enum:
            - standard
            - advance
            - agentic
            - fast_vlm
            - agentic_v2
          default: standard
          description: >
            Parsing mode. Available values are:


            - standard: Standard parsing for clear digital documents, balancing
            speed and accuracy.

            - advance: Enhanced parsing 1.0 for documents with stamps,
            signatures, multiple tables, or moderately complex layouts.

            - agentic: Smart parsing that combines standard and enhanced parsing
            and performs secondary parsing when conditions are met.

            - fast_vlm: Enhanced parsing 2.0 for complex layouts, scanned
            documents, and documents with multiple tables, improving parsing
            stability.

            - agentic_v2: Smart parsing 2.0 with two-stage layout analysis and
            content recognition for documents with complex layouts, tables, and
            formulas.
        enable_highlight:
          type: integer
          enum:
            - 0
            - 1
          default: 1
          description: >-
            Whether to show source locations. 1 keeps source positions for text
            blocks and tables; 0 omits positions. Supported in standard,
            agentic, fast_vlm, and agentic_v2 modes. Not supported in advance
            mode.
        enable_pdf_parse:
          type: boolean
          default: false
          description: >-
            Whether to use PDF text first. Effective only for digital PDFs with
            selectable text. Improves speed and text stability.
        pdf_pic_second_parsing:
          type: boolean
          default: false
          description: >-
            When PDF text first is enabled, whether to use VLM to parse image
            regions in the PDF again.
        enable_stamp_recognition:
          type: boolean
          default: false
          description: >-
            Whether to enable stamp recognition. When enabled, the service
            detects stamps in the document and attempts to extract stamp text.
  examples:
    DocumentRecognitionFileUrl:
      summary: Use file URL
      value:
        file_url: >-
          https://adp.laiye.com/web/agentic_doc_processor/laiye/file/2003c711818811f1a36200163e358400
        app_id: ootb_k7m2x9p4v1n8w3q6r5t0y2b4
        model_params:
          recognize_config:
            recognize_mode: standard
            enable_highlight: 1
            enable_pdf_parse: true
            pdf_pic_second_parsing: false
            enable_stamp_recognition: false
    DocumentRecognitionFileBase64:
      summary: Use file Base64
      value:
        file_base64: >-
          data:image/jpeg;base64,/9j/4AAQSkZJRgABAQA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dta+Ned/5zcd6PTrfxvlZwOLzFIsL9XHSyWT/wBXaW1I0kn9AxjsPAXYAHPaGByMaYynblrNSxTdUDIW9yYqpWPqGtLoHvonZA8cen8bmKDk3auOllsHdu2tqRpJP6BjA0PAXYAHNdP05dWLHY6y9U43Gy+5G6FvdlADBVYa0vZu5BO9fG+bMfgchGMXTuS1mo4p+qF4y3uTdKlU6gRpdA99E7IHjnSx+Mkit5WxbKO12UdPST2iVAqqe3nfUf8A25zcfgchGMXTuS1mo4p+qF4y3uTdKlU6gRpdA99E7IHjnUxePlrX8nbssjSW5gU6CT0xKoCg9vO+o/7zpcccccccccccccccc//Z
        app_id: ootb_k7m2x9p4v1n8w3q6r5t0y2b4
        model_params:
          recognize_config:
            recognize_mode: standard
            enable_highlight: 1
            enable_pdf_parse: false
            pdf_pic_second_parsing: false
            enable_stamp_recognition: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Production API Key. You can find it under My API in the ADP platform.
        Make sure the API Key is active and belongs to the production
        environment.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.