Maestro Task Query API Integration Guide
The main function of the Maestro Task Query API is to query the execution status and final result of a task using the task ID returned by the Maestro Video Generation API (POST /maestro/videos).
This document provides detailed integration instructions for the Maestro Task Query API. Since video generation is an asynchronous task, you need to poll this endpoint after submission to obtain the progress and final video. Polling is free and does not consume credits.
POST https://api.acedata.cloud/maestro/tasks
¶ Application Process
To use the Maestro Task Query API, first go to the Ace Data Cloud Console to obtain your API Token for later use.

If you have not logged in or registered, you will be automatically redirected to the login page to register and log in. Afterward, you will be automatically returned to the current page.
The API Key for a general-purpose application can be used for services enabled for the account; the Key for a dedicated application can be used within that application's service scope. Please check the Key's permissions, validity period, and limits, and confirm that the application balance is sufficient to pay for this request. Available trial credits are subject to what is displayed in your account. If the balance is insufficient, click the "Recharge" button.
📘 Full documentation: Maestro Task Query API →
¶ Query a Single Task
For information on how to create a video task, refer to the Maestro Video Generation API documentation. We will use a task ID returned by it as an example: f57e99c4f60f4373a15517742ce2357d, to demonstrate how to query its status and result.
¶ Set Request Headers and Request Body
Request Headers include:
accept: Specifies that the response should be in JSON format; set it toapplication/jsonhere.authorization: The key used to call the API; after applying for it, you can select it directly from the dropdown.content-type: The format of the request body; set it toapplication/jsonhere.
Request Body includes:
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | Required when querying one task | The task_id returned by POST /maestro/videos |
action |
string | No | retrieve (default, queries a single task); fixed as retrieve_batch when querying the history list |
¶ Code Examples
The corresponding CURL code is as follows:
curl -X POST 'https://api.acedata.cloud/maestro/tasks' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"id": "f57e99c4f60f4373a15517742ce2357d",
"action": "retrieve"
}'
The corresponding Python code is as follows:
import requests
url = "https://api.acedata.cloud/maestro/tasks"
headers = {
"accept": "application/json",
"authorization": "Bearer {token}",
"content-type": "application/json"
}
payload = {
"id": "f57e99c4f60f4373a15517742ce2357d",
"action": "retrieve"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
¶ Response Example
After a successful request, the API returns the status and result of the video task. An example response when the task is completed is shown below (the variants array contains one final video):
{
"id": "f57e99c4f60f4373a15517742ce2357d",
"started_at": 1769262721.823,
"finished_at": 1769264698.3,
"elapsed": 1976.477,
"status": "succeeded",
"progress": {
"percent": 100,
"stage": "producing",
"message": "rendering scene 2"
},
"request": {
"prompt": "用 20 秒讲清楚什么是向量数据库,适合零基础观众,结尾给一句记忆点",
"langs": [
"zh-cn"
],
"aspect": "9:16",
"duration": 20
},
"response": {
"success": true,
"data": {
"variants": [
{
"lang": "zh-cn",
"aspect": "9:16",
"kind": "video",
"title": "什么是向量数据库",
"output_url": "https://cdn.acedata.cloud/assets/examples/gemini/04a043bd-6b23-4b4e-945c-ce48158c3eee-3a89912507c7.mp4?example=video-001"
}
],
"project": {
"tarball_url": null,
"outputs": [
"https://…/zh.mp4"
]
},
"percent": 100,
"stage": "producing",
"progress": [
{
"stage": "producing",
"message": "rendering scene 2",
"pct": 60,
"t": 1750000000
}
]
}
}
}
The fields in the returned result are described as follows:
id: The ID of this video task, used to uniquely identify this video generation task.status: The task status, with valuespending → planning → producing → succeeded(orfailed). Whether the task has completed is determined by this top-levelstatus.elapsed: The elapsed time for the task (seconds).progress: The top-level progress object;percent(0–100) is 100 after the task succeeds;stageandmessagereflect the AI director's latest progress event (therefore, after success,stagemay still be the last execution stage, such asproducing). It can be used directly to display a progress bar.request: The request body used to initiate the task.response: The task's return information.success: Whether the task succeeded.data.variants: Contains one final video object for the selected language, includinglang,aspect,title,output_url(the final video download URL), and so on.data.project: The complete project output, includingtarball_url(the project package) andoutputs(final video links).data.progress: An array of progress events appended by stage (an append-only log), which can be used to display detailed real-time progress.
created_at: The task creation time, as a Unix timestamp (seconds).started_at: The time when the task began execution, as a Unix timestamp (seconds). It is null if the task has not yet started.finished_at: The task completion time, as a Unix timestamp (seconds). It is null if the task has not completed.
¶ Query the History List
Pass action: retrieve_batch to retrieve the most recent tasks for the currently logged-in executor (in descending order of creation time), which can be used for a "My Videos" list page. History lists are isolated by login identity.
Request Body includes:
| Field | Type | Required | Description |
|---|---|---|---|
action |
string | Yes | Fixed as retrieve_batch |
limit |
int | No | Number of results to return, default 20; valid range is 1–100 |
created_at_max |
int | No | Only returns tasks strictly earlier than this Unix timestamp (excluding the boundary value, used for pagination) |
created_at_min |
int | No | Only returns tasks strictly later than this Unix timestamp (excluding the boundary value) |
¶ Code Example
The corresponding CURL code is as follows:
curl -X POST 'https://api.acedata.cloud/maestro/tasks' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"action": "retrieve_batch",
"limit": 20
}'
¶ Response Example
After a successful request, the API will return the current user's historical task list:
{
"count": 2,
"items": [
{
"id": "f57e99c4f60f4373a15517742ce2357d",
"started_at": 1769262721.823,
"finished_at": 1769264698.3,
"elapsed": 1976.477,
"status": "succeeded",
"progress": {
"percent": 100,
"stage": "producing",
"message": "rendering scene 2"
},
"request": {
"prompt": "…",
"langs": [
"zh-cn"
],
"aspect": "9:16",
"duration": 20
},
"response": {
"success": true,
"data": {
"variants": [
{
"lang": "zh-cn",
"output_url": "https://cdn.acedata.cloud/assets/examples/gemini/04a043bd-6b23-4b4e-945c-ce48158c3eee-3a89912507c7.mp4?example=video-003"
}
]
}
}
}
]
}
The fields in the response are described below:
count: The total number of tasks visible to the currently logged-in user, unaffected by time conditions orlimit.items: An array of tasks filtered by time conditions andlimit, sorted by creation time in descending order; the format of each element is consistent with the response from "Query a Single Task".
¶ Polling Recommendations
Because video production takes a long time, status will progress through pending → planning → producing → succeeded (or failed). It is recommended to poll every 5–10 seconds until status becomes succeeded or failed. You can use the top-level progress.percent to display a real-time progress bar. Polling this endpoint is free and does not consume credits.
¶ Error Handling
When calling the API, if an error occurs, the API will return the corresponding error code and message. For example:
401 invalid_token: Unauthorized, invalid or missing authorization token.404 not_found: Task not found, the given task_id does not exist.429 too_many_requests: Too many requests, you have exceeded the rate limit.500 api_error: Internal server error, something went wrong on the server.
¶ Error Response Example
{
"success": false,
"error": {
"code": "api_error",
"message": "fetch failed"
},
"trace_id": "2cf86e86-22a4-46e1-ac2f-032c0f2a4e89"
}
¶ Conclusion
Through this document, you have learned how to use the Maestro task query API to query the status and results of a single task, as well as retrieve the current user's historical task list. We hope this document helps you better integrate and use the API. If you have any questions, please feel free to contact our technical support team.
¶ Related Endpoints
- Maestro Video Generation API Integration Guide: Automatically produce a finished video with subtitles using a single natural-language prompt. A
task_idis returned upon submission, and this endpoint can then be used to poll for the result.
