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
| Item | Value |
|---|---|
| Request Method | GET |
| Request Path | /task/list |
| Authentication | Raw API key in the Authorization header |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
status | string | No | — | Filter by queued / processing / completed / failed / cancelled |
task_type | string | No | — | Filter by task type such as asr, image_purify, or video_stabilizer |
page | number | No | 1 | Page number |
page_size | number | No | 20 | Items 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
| Item | Value |
|---|---|
| Request Method | POST |
| Request Path | /task/{task_id}/cancel |
| Authentication | Raw API key in the Authorization header |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | Task ID |
⚠️ Warning: The current service implementation only allows cancellation from
createdorqueued.processing,completed, andfailedwill 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.
datais an empty string rather than a task object.