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

# Query Task Result

> Use the task_id returned from submission to query task status and results.

<Beta />

Use the `task_id` returned from submission to query task status and generation results.


## OpenAPI

````yaml openapi/en/qwmusic.json GET /qwm/api/v1/tasks/{task_id}
openapi: 3.1.0
info:
  title: QW Music API
  description: >-
    QW Music passthrough API, fully consistent with DashScope official
    request/response bodies and paths. The gateway only handles authentication
    and billing; everything else is passed through as-is.
  version: 1.0.0
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /qwm/api/v1/tasks/{task_id}:
    get:
      summary: Query Task Result
      description: >-
        Use the task_id returned from submission to query task status and
        results.
      operationId: qwmFetchTask
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
          description: The task_id returned when submitting the task
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskFetchResponse'
components:
  schemas:
    TaskFetchResponse:
      type: object
      properties:
        request_id:
          type: string
          description: Request ID.
        output:
          type: object
          description: Task output information.
          properties:
            task_id:
              type: string
              description: Task ID.
            task_status:
              type: string
              description: Task status.
              enum:
                - PENDING
                - RUNNING
                - SUCCEEDED
                - FAILED
            audio_url:
              type: string
              description: >-
                Generated audio URL (returned on success). When CDN transfer is
                enabled, this is a persistent CDN address.
            candidate_audio_url:
              type: string
              description: >-
                Secondary audio URL (returned when return_candidate_audio=true
                and task succeeds).
            refine_style:
              type: string
              description: Refined style info (returned when return_post_info=true).
            refine_lyrics:
              type: string
              description: Refined lyrics content (returned when return_post_info=true).
            code:
              type: string
              description: Error code (returned on failure).
            message:
              type: string
              description: Error message (returned on failure).
        usage:
          type: object
          description: Usage info (returned on success).
          properties:
            output_audio_duration:
              type: integer
              description: Main audio duration (seconds).
            output_candidate_audio_duration:
              type: integer
              description: Secondary audio duration (seconds).

````