Maestro Video Generation API Integration Guide
Maestro is an Agent-native video production interface: you describe the video you want in a natural-language prompt (optionally attaching reference images / videos / audio using file_urls), and a headless “AI director” automatically handles topic selection, scriptwriting, visual generation, voiceover, music, compositing, and rendering, ultimately producing a finished video with subtitles and uploading it to a CDN.
This article provides detailed instructions for integrating the Maestro video generation API, helping you quickly integrate and fully utilize its capabilities.
This is an asynchronous task API: after submission, it immediately returns a task_id, which you can then use to poll for results through the Maestro Task Query API (POST /maestro/tasks) (polling is free of charge). To continue iterating on an existing video, use action: remix / edit / extend together with ref_task_id.
¶ Application Process
To use the Maestro video generation API, first obtain your API Token from the Ace Data Cloud Console and keep it for later use.

If you have not yet logged in or registered, you will be automatically redirected to the login page to register and log in. Once you are done, you will be automatically returned to the current page.
A general application's API Key can be used for services enabled for the account; a dedicated application's Key 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 shown in your account; if the balance is insufficient, click the “Recharge” button.
📘 Full documentation: Maestro Video Generation API →
¶ Basic Usage
POST https://api.acedata.cloud/maestro/videos
The most basic usage requires only a natural-language prompt; the AI director will automatically decide on the script, visuals, voiceover, and editing. Let's first look at the request headers and body that need to be set.
Request Headers include:
accept: The desired response format; set this toapplication/json, meaning JSON format.authorization: The key for calling the API; after applying for one, you can select it directly from the dropdown.content-type: The format of the request body; set this toapplication/json.
The Request Body mainly includes:
prompt: Describe the video to be made in natural language (topic, what to show, style, and audience).langs: An array of languages for the finished video; pass only one language per request, such as["zh-cn"]. Defaults to["zh-cn"].aspect: The aspect ratio:9:16(default) /16:9/1:1.duration: The target duration in seconds; defaults to 30.
All fields in the request body are shown in the table below:
| Field | Type | Required | Description |
|---|---|---|---|
prompt |
string | Yes | Describe the video to be made in natural language (topic, what to show, style, and audience). The script, visuals, voiceover, and editing are all decided by AI |
action |
string | No | generate (default, generate a new video) / remix / edit / extend (iterate on an existing video; requires ref_task_id) |
ref_task_id |
string | No | Required when action is remix / edit / extend: the task_id of the historical task to use as the starting point |
file_urls |
string[] | No | Reference media (image / video / audio URLs), such as product images or logos to appear in the video, or source clips to be subtitled |
langs |
string[] | No | Language of the finished video; only one language can be passed per request, such as ["zh-cn"]. Defaults to ["zh-cn"] |
aspect |
string | No | 9:16 (default) / 16:9 / 1:1; all output is 1080p/30fps |
duration |
int | No | Target duration in seconds; defaults to 30 and supports 5–300 seconds. Billing is based on the actual duration of the finished video, but will not exceed the requested duration |
scenario |
string | No | Video type: auto / narrated / captions / avatar / drama. captions requires a source video, and avatar requires a portrait |
style |
string | No | Visual style preset: auto (default) / cinematic / glass / luxury / swiss / modern / editorial / warm / vibrant / neon / mono / pastel / bold / industrial / futuristic / retro. Free text is also accepted as a soft prompt. Can be set independently of scenario |
voice |
string | No | Narration voice (language-independent and usable across languages): auto (default) / warm-female / bright-female / anchor-female / clean-female / calm-male / deep-male / documentary-male / energetic-male / storyteller-male; 32-character hexadecimal voice reference_ids are also supported, but other free text is not a valid voice ID |
The following demonstrates a specific example. Suppose we want to generate a 20-second, portrait-format educational video in Chinese. The corresponding CURL code is as follows:
curl -X POST 'https://api.acedata.cloud/maestro/videos' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"prompt": "用 20 秒讲清楚什么是向量数据库,适合零基础观众,结尾给一句记忆点",
"langs": ["zh-cn"],
"aspect": "9:16",
"duration": 20
}'
The corresponding Python code is as follows:
import requests
url = "https://api.acedata.cloud/maestro/videos"
headers = {
"accept": "application/json",
"authorization": "Bearer {token}",
"content-type": "application/json"
}
payload = {
"prompt": "用 20 秒讲清楚什么是向量数据库,适合零基础观众,结尾给一句记忆点",
"langs": ["zh-cn"],
"aspect": "9:16",
"duration": 20
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
Click Run, and you will see that a result is returned immediately, as follows:
{
"success": true,
"task_id": "f57e99c4f60f4373a15517742ce2357d",
"trace_id": "70e1cb12-c619-4292-a416-90191205996b"
}
The fields in the returned result are described as follows:
success: Whether the task was successfully submitted.task_id: The ID of this video generation task, used to poll for results through the Maestro Task Query API.trace_id: The trace ID of this request, which can be provided to technical support to diagnose issues.
Because video production takes a long time, the API returns the task_id immediately and does not wait for video rendering to finish. You then need to use the task_id to poll for results; see the “Get Results” section for details.
¶ Specify Video Type and Style (scenario / style)
When scenario is not provided, AI determines it automatically (equivalent to auto); to set the video to a specific type, provide it explicitly. For example, to make a vertical short drama, you can specify the following:
scenario: The video type, set here todrama(a short drama with characters + dialogue).style: The visual style, set here tocinematic(a cinematic look).
The CURL code for the example is as follows:
curl -X POST 'https://api.acedata.cloud/maestro/videos' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"prompt": "两个合租室友因为一只猫闹翻又和好,三幕反转,结尾温暖",
"scenario": "drama",
"style": "cinematic",
"aspect": "9:16",
"duration": 40
}'
Common combinations:
- Narrated short video:
scenario: "narrated". - Automatic subtitles:
scenario: "captions"; the source video must be provided usingfile_urls. - Digital avatar / talking-head video:
scenario: "avatar"; a portrait must be provided usingfile_urls. - Short drama:
scenario: "drama"(characters + dialogue). styleis a visual style preset (such asmodern/neon/luxury); it does not change the type, only the appearance.voicespecifies the narrator’s voice (such aswarm-female/deep-male); it is independent of language and works across languages.
The response is the same as in “Basic Usage” and also returns the task_id immediately.
¶ Output Video Language
A task delivers one finished video in one language only. langs can contain only one language code, such as ["zh-cn"] or ["en"]; providing multiple languages returns a 400 error. If you need videos in different languages, create separate tasks. The language selection does not change the price per second.
¶ Iterate on an Existing Video (remix / edit / extend)
Provide action and the previous task’s ref_task_id to make incremental changes based on the original project (such as “change the title of Act 2,” “change the voiceover,” or “darken the overall look”). Small changes are fast; large changes require redoing the video:
curl -X POST 'https://api.acedata.cloud/maestro/videos' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"action": "remix",
"ref_task_id": "f57e99c4f60f4373a15517742ce2357d",
"prompt": "把开场标题换成更有冲击力的一句,整体配色更暗一些"
}'
remix: Reinterpret the original video structure (retain the theme and adjust its presentation).edit: Refine specified parts (such as changing the title, changing the voiceover, or adjusting colors).extend: Extend the content based on the original video.
The response also immediately returns a new task_id, which you can use to poll for the updated finished video.
¶ Get Results
Because video production takes a long time, this API returns the task_id immediately after submission. You need to use it to poll for results through the Maestro Task Query API:
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"
}'
When the task is complete, information for one finished video is returned (in the variants array). The status progresses through pending → planning → producing → succeeded (or failed); polling is free and does not consume credits. For the complete response format and historical list queries, see the Maestro Task Query API Integration Guide.
¶ Billing
After a task succeeds, billing is based on the actual duration of the delivered video; failed tasks are not charged. Billable duration is measured in whole seconds and does not exceed the requested duration; if the finished video’s duration cannot be read, the requested duration is used. Submitting a task is not billed separately, and /maestro/tasks polling is free.
积分 = 实际计费秒数 × 0.7
All scenarios, actions, and languages use the same price, with no scenario multipliers or language surcharges. Each task delivers one finished video in one language only. Requested target durations of 5–300 seconds are supported, and all output is 1080p / 30fps.
| Actual billable duration | Credits |
|---|---|
| 30 seconds | 21 |
| 60 seconds | 42 |
| 120 seconds | 84 |
| 300 seconds | 210 |
/maestro/tasks polling |
Free |
¶ Error Handling
When calling the API, if an error occurs, the API returns the corresponding error code and message. For example:
400 invalid_request: Bad request, possibly due to a missingpromptor invalid parameters.401 invalid_token: Unauthorized, invalid or missing authorization token.403 forbidden: Forbidden, insufficient balance or access.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.
¶ Example Error Response
{
"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 Video Generation API: with just a natural-language prompt, you can automatically complete the script, assets, voiceover, background music, editing, subtitles, and final video rendering, with support for specifying the video type, style, voice, output language, and iterating on existing videos. 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 APIs
- Maestro Task Query API Integration Guide: Use the
task_idreturned byPOST /maestro/videosto query task status and results, or retrieve a list of historical tasks (polling is free).
