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

# Tasks

> Poll the result of an asynchronous captcha task. Submit the task_id returned by any captcha API (token or recognition) called with async=true; the response reports status 'processing' until solved, then returns the result — token for token APIs, solution for recognition classification, or text for image2text. Billing happens once, only when the task is successfully solved.



## OpenAPI

````yaml /openapi/hcaptcha.json post /captcha/tasks
openapi: 3.0.0
info:
  title: hCaptcha verification code recognition service
  version: 1.0.0
  description: >-
    API reference for hCaptcha verification code recognition service on Ace Data
    Cloud.
servers:
  - url: https://api.acedata.cloud
    description: Ace Data Cloud API
security:
  - bearerAuth: []
paths:
  /captcha/tasks:
    post:
      summary: Tasks
      description: >-
        Poll the result of an asynchronous captcha task. Submit the task_id
        returned by any captcha API (token or recognition) called with
        async=true; the response reports status 'processing' until solved, then
        returns the result — token for token APIs, solution for recognition
        classification, or text for image2text. Billing happens once, only when
        the task is successfully solved.
      parameters:
        - in: header
          name: accept
          schema:
            enum:
              - application/json
            type: string
          required: false
          description: Specifies the format of the response from the server.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - task_id
              properties:
                task_id:
                  type: string
                  example: 61138bb6-19aa-11ec-a9c8-0242ac110002
                  description: >-
                    The task id returned when a token API was called with
                    async=true.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  task_id: 61138bb6-19aa-11ec-a9c8-0242ac110002
                  status: ready
                  token: P1_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1Ni......
                properties:
                  success:
                    type: boolean
                    description: Whether the query succeeded.
                  task_id:
                    type: string
                    description: The task id being polled.
                  status:
                    type: string
                    enum:
                      - processing
                      - ready
                    description: >-
                      Task state. 'processing' means keep polling; 'ready' means
                      the token field is populated.
                  token:
                    type: string
                    description: >-
                      The solved verification token (token APIs). Present only
                      when status is 'ready'.
                  solution:
                    type: object
                    description: >-
                      The recognition result for recognition/recaptcha2 and
                      recognition/hcaptcha. Present only when status is 'ready'.
                  text:
                    type: string
                    description: >-
                      The recognized text for recognition/image2text. Present
                      only when status is 'ready'.
          description: OK, the request is successful.
        '400':
          content:
            application/json:
              schema:
                type: object
                example:
                  error:
                    code: invalid_query
                    message: no task_id specified
                  trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
          description: Bad request, possibly due to a missing task_id.
        '401':
          content:
            application/json:
              schema:
                type: object
                example:
                  error:
                    code: invalid_token
                    message: The specified token is invalid or wrong.
                  trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
          description: Unauthorized, invalid or missing authorization token.
        '404':
          content:
            application/json:
              schema:
                type: object
                example:
                  error:
                    code: not_found
                    message: task not found
                  trace_id: 2efa9340-b21b-4e26-9e14-4aac95f343ab
          description: The specified task_id does not exist.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token from https://platform.acedata.cloud

````