Task Management

The task management APIs provide task listing and task cancellation. Every async image, audio, and video job is tracked through this shared task system.

Task Progress Query

Each async processing task returns a task_id when it is created. You can keep polling the query endpoint documented on each image, audio, or video capability page; if the frontend needs a more responsive progress bar or status notifications, use WebSocket task progress query instead. After a subscription succeeds, the server immediately sends a task snapshot and then streams queued, processing, completed, failed, and cancelled status changes.

See Task Progress Query.

List Tasks

Basic Information

ItemValue
Request MethodGET
Request Path/task/list
AuthenticationRaw API key in the Authorization header

Query Parameters

ParameterTypeRequiredDefaultDescription
statusstringNoFilter by queued / processing / completed / failed / cancelled
task_typestringNoFilter by task type such as asr, image_purify, or video_stabilizer
pagenumberNo1Page number
page_sizenumberNo20Items per page

Request Example

curl -X GET "https://api.ai-mcn.tv:10000/task/list?status=completed&page=1&page_size=10" \
  -H "Authorization: YOUR_API_KEY"

Success Example

{
  "code": 200,
  "msg": "success",
  "data": {
    "list": [
      {
        "id": "537489015178247",
        "status": "completed",
        "priority": "normal",
        "progress": 100,
        "estimated_duration": 8.5,
        "estimated_queue_wait_duration": 1.2,
        "actual_duration": 7.6,
        "process_start_time": "2026-04-05T08:00:02Z",
        "finish_time": "2026-04-05T08:00:10Z",
        "create_time": "2026-04-05T08:00:01Z",
        "task_type_key": "image_purify",
        "task_type_name": "Image Watermark Removal"
      }
    ],
    "total": 1,
    "page": 1,
    "page_size": 10
  }
}

Cancel Task

Basic Information

ItemValue
Request MethodPOST
Request Path/task/{task_id}/cancel
AuthenticationRaw API key in the Authorization header

Path Parameters

ParameterTypeRequiredDescription
task_idstringYesTask ID

⚠️ Warning: The current service implementation only allows cancellation from created or queued. processing, completed, and failed will return an error.

Request Example

curl -X POST https://api.ai-mcn.tv:10000/task/537489015178247/cancel \
  -H "Authorization: YOUR_API_KEY"

Success Example

{
  "code": 200,
  "msg": "任务已取消",
  "data": ""
}

ℹ️ Note: In the current version, a successful cancel response returns only the success message. data is an empty string rather than a task object.

Next Steps