> ## 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

> Query Task Result - Query the status and result of video generation task by task ID



## OpenAPI

````yaml openapi/en/happyhorse.json GET /happyhorse/api/v1/tasks/{task_id}
openapi: 3.1.0
info:
  title: HappyHorse Video API
  version: 1.0.0
  description: >-
    HappyHorse Video API provides efficient video generation and editing
    capabilities, helping developers quickly integrate intelligent video
    features.
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /happyhorse/api/v1/tasks/{task_id}:
    get:
      description: >-
        Query Task Result - Query the status and result of video generation task
        by task ID
      parameters:
        - name: task_id
          in: path
          required: true
          description: Task ID. Valid for 24 hours.
          schema:
            type: string
      responses:
        '200':
          description: Query task result successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  request_id:
                    type: string
                    description: >-
                      Request unique identifier. Can be used for request tracing
                      and troubleshooting.
                    example: c11018a8-3f83-9591-a636-xxxxxx
                  output:
                    type: object
                    description: Task output information
                    properties:
                      task_id:
                        type: string
                        description: Task ID. Valid for 24 hours.
                        example: 051c7b40-b2c5-4341-aee4-xxxxxx
                      task_status:
                        type: string
                        description: Task status
                        enum:
                          - PENDING
                          - RUNNING
                          - SUCCEEDED
                          - FAILED
                          - CANCELED
                          - UNKNOWN
                        example: SUCCEEDED
                      code:
                        type: string
                        description: Error code. Only returned when task_status is FAILED.
                        example: InvalidParameter
                      message:
                        type: string
                        description: >-
                          Error message. Only returned when task_status is
                          FAILED.
                        example: The resolution is not valid
                      submit_time:
                        type: string
                        description: >-
                          Task submit time. Timezone is UTC+8, format:
                          YYYY-MM-DD HH:mm:ss.SSS. Only returned when task
                          succeeds.
                        example: '2026-04-26 14:13:14.373'
                      scheduled_time:
                        type: string
                        description: >-
                          Task execution time. Timezone is UTC+8, format:
                          YYYY-MM-DD HH:mm:ss.SSS. Only returned when task
                          succeeds.
                        example: '2026-04-26 14:13:14.419'
                      end_time:
                        type: string
                        description: >-
                          Task completion time. Timezone is UTC+8, format:
                          YYYY-MM-DD HH:mm:ss.SSS. Only returned when task
                          succeeds.
                        example: '2026-04-26 14:14:13.679'
                      orig_prompt:
                        type: string
                        description: >-
                          Original input prompt, corresponds to the request
                          parameter prompt. Only returned when task succeeds.
                        example: >-
                          Let the horse-head-human character in the video wear
                          the striped sweater from the image
                      video_url:
                        type: string
                        description: >-
                          Video URL. Only returned when task_status is
                          SUCCEEDED. Link is valid for 24 hours, you can
                          download the video through this URL. Video format is
                          MP4 (H.264 encoding).
                        example: >-
                          https://dashscope-result.oss-cn-beijing.aliyuncs.com/xxxx.mp4
                    required:
                      - task_id
                      - task_status
                    example:
                      task_id: 1469cfc3-3004-4d9e-ab10-xxxxxx
                      task_status: SUCCEEDED
                      submit_time: '2026-04-25 15:03:25.848'
                      scheduled_time: '2026-04-25 15:03:25.884'
                      end_time: '2026-04-25 15:04:05.882'
                      orig_prompt: >-
                        Woman in red qipao character1, camera first captures the
                        slim fit and S-curve from side medium shot, then
                        switches to low angle to capture the tassel earrings
                        character3 swaying as she gracefully opens the folding
                        fan character2, finally zooms to facial close-up,
                        freezing her subtle charm as her fingertips lightly
                        touch the fan bone with eyes flowing with emotion,
                        showcasing Oriental elegance from multiple perspectives.
                      video_url: >-
                        https://dashscope-result.oss-cn-beijing.aliyuncs.com/xxxx.mp4
                  usage:
                    type: object
                    description: >-
                      Output information statistics. Only counted for successful
                      results.
                    properties:
                      duration:
                        type: number
                        description: >-
                          Total video duration of generated video, used for
                          billing.
                        example: 5
                      input_video_duration:
                        type: number
                        description: Input video duration in seconds.
                        example: 0
                      output_video_duration:
                        type: number
                        description: Output video duration in seconds.
                        example: 5
                      video_count:
                        type: integer
                        description: Number of generated videos. Fixed at 1.
                        example: 1
                      SR:
                        type: integer
                        description: Resolution level of generated video.
                        example: 720
                      ratio:
                        type: string
                        description: Aspect ratio of generated video.
                        example: '16:9'
                required:
                  - request_id
                  - output
                example:
                  request_id: 35137489-2862-96cb-b6f2-xxxxxx
                  output:
                    task_id: 1469cfc3-3004-4d9e-ab10-xxxxxx
                    task_status: SUCCEEDED
                    submit_time: '2026-04-25 15:03:25.848'
                    scheduled_time: '2026-04-25 15:03:25.884'
                    end_time: '2026-04-25 15:04:05.882'
                    orig_prompt: >-
                      Woman in red qipao character1, camera first captures the
                      slim fit and S-curve from side medium shot, then switches
                      to low angle to capture the tassel earrings character3
                      swaying as she gracefully opens the folding fan
                      character2, finally zooms to facial close-up, freezing her
                      subtle charm as her fingertips lightly touch the fan bone
                      with eyes flowing with emotion, showcasing Oriental
                      elegance from multiple perspectives.
                    video_url: >-
                      https://dashscope-result.oss-cn-beijing.aliyuncs.com/xxxx.mp4
                  usage:
                    duration: 5
                    input_video_duration: 0
                    output_video_duration: 5
                    video_count: 1
                    SR: 720
                    ratio: '16:9'
      security:
        - CustomApiKey: []
components:
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        Please go to <a href='https://dashboard.ttapi.io' target='_blank'>TTAPI
        Console</a> to get the API key.

````