> ## Documentation Index
> Fetch the complete documentation index at: https://docs.textin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Async Parse

> Create an asynchronous document parsing job, returns job_id immediately. Query processing status and results via job_id.

Suitable for handling large files or batch files, avoiding HTTP timeout limitations.




## OpenAPI

````yaml api-reference/parse-async-1.3.0.openapi.yaml POST /api/v1/xparse/parse/async
openapi: 3.0.3
info:
  title: XParse Parse Async API
  description: >
    Standalone asynchronous API for document parsing, supporting asynchronous
    processing of document parsing tasks.


    This API is suitable for handling large files or batch files. Query
    processing status and results via job_id to avoid long waiting times.
  version: 1.0.0
  contact:
    name: TextIn API Team
servers:
  - url: https://api.textin.ai
    description: Production Environment
security:
  - AppIdAuth: []
    SecretCodeAuth: []
tags:
  - name: XParse Parse
    description: >
      Standalone asynchronous API for document parsing


      ## Features

      - 📄 Asynchronous Processing: Supports large files and batch file
      processing

      - 🔔 Webhook Support: Supports task completion callback notifications

      - 📊 Status Query: Query task status via job_id

      - ⏱️ No Timeout Limit: Avoids HTTP timeout issues


      ## Billing Information

      - Billed based on the number of pages processed

      - Billing information is associated via x-ti-app-id and x-ti-secret-code
paths:
  /api/v1/xparse/parse/async:
    post:
      tags:
        - XParse Parse
      summary: Create Async Parse Job
      description: >
        Create an asynchronous document parsing job, returns job_id immediately.
        Query processing status and results via job_id.


        Suitable for handling large files or batch files, avoiding HTTP timeout
        limitations.
      operationId: createParseAsyncJob
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: Upload document file, choose either file or file_url
                file_url:
                  type: string
                  description: Document URL, choose either file_url or file
                config:
                  allOf:
                    - $ref: '#/components/schemas/ParseConfig'
                  example:
                    document:
                      password: example-pdf-password
                    capabilities:
                      include_hierarchy: true
                      include_inline_objects: true
                      include_char_details: true
                      include_image_data: true
                      include_table_structure: true
                      pages: true
                      title_tree: true
                      table_view: html
                      remove_watermark: true
                      crop_dewarp: true
                    scope:
                      page_range: 1-2
                    config:
                      force_engine: textin
                      engine_params:
                        parse_mode: scan
                        formula_level: 0
                        image_output_type: url
                        recognize_chemical: true
                webhook:
                  type: string
                  description: >
                    Webhook callback URL (optional). This URL will be invoked
                    when the task is completed or failed.


                    Webhook request format:

                    - Method: POST

                    - Content-Type: application/json

                    - Body: {"job_id": "xxx", "status": "completed",
                    "result_url": "https://..."}
                  example: https://your-server.com/webhook
            encoding:
              config:
                contentType: application/json
      responses:
        '200':
          description: Job created successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/codemessage'
                  - $ref: '#/components/schemas/CreateJobResponse'
              examples:
                success:
                  summary: Success Example
                  value:
                    code: 200
                    message: success
                    data:
                      job_id: c020a1f03c994091a94d6763cdbe0684
                error:
                  summary: Error Example
                  value:
                    code: 40004
                    message: Parameter error
                    data:
                      message: File not uploaded
components:
  schemas:
    ParseConfig:
      type: object
      description: Parse configuration parameters
      properties:
        document:
          $ref: '#/components/schemas/DocumentConfig'
        capabilities:
          $ref: '#/components/schemas/Capabilities'
        scope:
          $ref: '#/components/schemas/Scope'
        config:
          $ref: '#/components/schemas/ExpertConfig'
    codemessage:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          default: 200
          description: >
            Status code

            - 200: Success

            - 40101: x-ti-app-id or x-ti-secret-code is empty

            - 40102: x-ti-app-id or x-ti-secret-code is invalid, authentication
            failed

            - 40004: Parameter error, please check technical documentation and
            verify parameters

            - 500: Internal server error


            For more detailed error information, refer to [Error Code
            Description](/xparse/v1/parse-response#常见错误码).
          enum:
            - 200
            - 40101
            - 40102
            - 40004
            - 500
        message:
          type: string
          description: Error message
          example: success
    CreateJobResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/CreateJobData'
    DocumentConfig:
      type: object
      description: Document-related configuration
      properties:
        password:
          type: string
          description: Document password (e.g., for encrypted PDF)
    Capabilities:
      type: object
      description: Parse strategy and format configuration
      properties:
        include_hierarchy:
          type: boolean
          default: true
          description: >-
            Whether to return hierarchy and relationship fields between
            elements. When enabled, returns parent-child relationships,
            reference relationships, and other information between elements
            (such as parent_id, children_ids, ref_element_id), used to express
            the structured relationship graph of the document.
        include_inline_objects:
          type: boolean
          default: false
          description: >-
            Whether to return fine-grained objects. When enabled, text elements
            will return fine-grained objects contained within them (such as
            formulas, images, handwritten signatures, checkboxes, etc.). If
            table structure is also enabled, inline objects within table cells
            will be identified and returned.
        include_char_details:
          type: boolean
          default: false
          description: >-
            Whether to return character-level details (char_details). When
            enabled, returns detailed information for each character in the text
            (such as coordinates, confidence, candidate characters). If table
            structure is also enabled, characters within table cells will also
            return these details.
        include_image_data:
          type: boolean
          default: false
          description: >-
            Whether to return image data (image_data). When enabled, image
            elements will return complete image data (including image URL, MIME
            type, Base64 encoding, and recognized text in the image). If images
            appear as inline objects in text or table cells, the system will
            automatically supplement the corresponding image information.
        include_table_structure:
          type: boolean
          default: false
          description: >-
            Whether to return detailed structured information for tables. When
            enabled, returns rows, columns, and detailed information for each
            cell in JSON format.
        pages:
          type: boolean
          default: false
          description: >-
            Whether to return page metadata list, including page number, width
            and height, rotation angle, rendered image URL (page_image_url),
            list of contained elements (element_ids), etc.
        title_tree:
          type: boolean
          default: false
          description: Whether to return the title tree (table of contents).
        table_view:
          type: string
          enum:
            - markdown
            - html
          default: html
          description: Format for table representation in markdown.
        remove_watermark:
          type: boolean
          default: false
          description: Whether to perform watermark removal preprocessing on the document.
        crop_dewarp:
          type: boolean
          default: false
          description: Whether to perform crop and dewarp preprocessing on the document.
    Scope:
      type: object
      description: Processing range control
      properties:
        page_range:
          type: string
          description: >-
            Page range, starts from 1, supports multiple closed intervals, e.g.,
            "1-2,3-4,5-10"
          example: 1-5
    ExpertConfig:
      type: object
      description: Advanced configuration (expert mode)
      properties:
        force_engine:
          type: string
          enum:
            - textin
          description: Force specify internal engine, only used in expert mode.
        engine_params:
          type: object
          additionalProperties: true
          description: Engine-level custom parameters
    CreateJobData:
      type: object
      required:
        - job_id
      properties:
        job_id:
          type: string
          description: Job ID, used to query job status
          example: c020a1f03c994091a94d6763cdbe0684
  securitySchemes:
    AppIdAuth:
      type: apiKey
      in: header
      name: x-ti-app-id
      description: >-
        Please [log in to
        TextIn](https://www.textin.ai/console/dashboard/setting) and navigate to
        "Console - API Keys" to view x-ti-app-id
    SecretCodeAuth:
      type: apiKey
      in: header
      name: x-ti-secret-code
      description: >-
        Please [log in to
        TextIn](https://www.textin.ai/console/dashboard/setting) and navigate to
        "Console - API Keys" to view x-ti-secret-code

````