0%

Maestro 任务查询 API

查询由 POST /maestro/videos 创建的视频任务的状态与结果。轮询免费,不消耗积分。

POST https://api.acedata.cloud/maestro/tasks

查询单个任务

1
2
3
4
curl -X POST https://api.acedata.cloud/maestro/tasks \
-H "authorization: Bearer {token}" \
-H "content-type: application/json" \
-d '{ "id": "f57e99c4f60f4373a15517742ce2357d", "action": "retrieve" }'
字段 类型 说明
id string POST /maestro/videos 返回的 task_id
action string retrieve(默认,查单个)/ retrieve_batch(查历史列表)

返回(每种语言对应一个 variant):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"id": "f57e99c4f60f4373a15517742ce2357d",
"status": "succeeded",
"elapsed": 312,
"request": { "prompt": "…", "langs": ["zh-cn", "en"], "aspect": "9:16", "duration": 20 },
"response": {
"success": true,
"data": {
"variants": [
{ "lang": "zh-cn", "aspect": "9:16", "kind": "video", "title": "什么是向量数据库", "output_url": "https://…/zh.mp4" },
{ "lang": "en", "aspect": "9:16", "kind": "video", "title": "What is a vector database", "output_url": "https://…/en.mp4" }
],
"project": { "tarball_url": "https://…/project.tar.gz", "outputs": ["https://…/zh.mp4", "https://…/en.mp4"] },
"progress": [ { "stage": "producing", "message": "rendering scene 2", "pct": 60, "t": 1750000000 } ],
"stage": "succeeded"
}
}
}

status 取值:pending → planning → producing → succeeded(或 failed)。response.data.progress 是按阶段追加的进度数组,可用于展示实时进度条。建议每 5–10 秒轮询一次,直到 succeededfailed

查询历史列表

action: retrieve_batch 取当前用户最近的任务(按创建时间倒序),可用于「我的视频」列表:

1
2
3
4
curl -X POST https://api.acedata.cloud/maestro/tasks \
-H "authorization: Bearer {token}" \
-H "content-type: application/json" \
-d '{ "action": "retrieve_batch", "limit": 20 }'
字段 类型 说明
action string retrieve_batch
limit int 返回条数,默认 20,最大 100
created_at_max int 可选,只返回早于该 Unix 时间戳的任务(翻页用)
created_at_min int 可选,只返回晚于该 Unix 时间戳的任务

返回:

1
{ "count": 2, "items": [ { "id": "…", "status": "succeeded", "request": { … }, "response": { … } } ] }