Skip to content

Query: Task Results

Overview

  • API: Query task results (GET /task/{task_id})
  • Description: Check the processing status and result of an asynchronous generation task. First call the generation API to obtain task_id, then use this endpoint to query results.

Authentication

  • Use Bearer Token in the request header: Authorization: Bearer <token>.

Request Parameters

  • Path parameter:
    • task_id (string, required)
      • The task ID obtained from the asynchronous task.

Response Details

  • Response Content-Type: application/json

  • Important fields:

    • code (integer): business return code, 0 indicates success in examples.
    • data (object): task data, including:
      • status (string): task status, e.g. Success, Processing, Failed.
      • resp_data (string): response data, structure may vary by scenario.
      • video_url (string): video download address (sometimes a file_id must be used with the download API to obtain the actual URL).
      • image_urls (array): list of images, may be null if absent.
      • binary_data_base64 (array[string]): base64-encoded binary data list, if present.
    • status (integer): HTTP-style status code, if provided.
    • message (string): message description.
    • request_id (string): request ID for troubleshooting.
    • time_elapsed (string): elapsed time information.

Success Response Example

json
{
    "status": "Success",
    // Use file_id with the download API to obtain the final video URL.
    "file_id": "314053136425242",
    "task_id": "314052875571396",
    "base_resp": {
        "status_msg": "success",
        "status_code": 0
    },
    "video_width": 768,
    "video_height": 1152
}

Field Descriptions

  • file_id (string): when returned, use the download API with this file ID to obtain the final video URL.
  • task_id (string): task ID.
  • base_resp (object): basic response information, includes status_code and status_msg.
  • video_width, video_height: video resolution details, if returned.

Notes

  • If the interface returns file_id, use the corresponding download API to get the video file address.
  • Response structure may vary by model or scenario, so rely on actual returned fields.