Ai Video Ads API guide
Ai Video Ads API: Create a spokesperson advertisement from a portrait and product name, with optional product imagery and script guidance.
Model overview
Create a spokesperson advertisement from a portrait and product name, with optional product imagery and script guidance.
API integration
| Documentation | Value |
|---|---|
| API invocation identifier | ai-video-ads |
| Integration | Async task API |
Use this invocation identifier in API requests. Check your authorized model catalog for access. Follow the Quickstart for your first complete call.
Request parameters
Select a mode to highlight its required inputs. Mode selection does not change the API field names.
Studio presets describe the form setup, not guaranteed server defaults. Send preset values explicitly to reproduce them.
Person photo URL (required).
Product name (required).
Required for Reference Image.
Product photo URL. Provides more accurate compositing when available.
Optional script or selling points to guide the video.
Language of the generated ad script.
Allowed values: "en", "zh", "es", "fr", "pt".
Studio preset: "en".
The duration of the generated video in seconds.
Value: minimum 5; maximum 15.
Studio preset: 5.
Standard quantity control field. The allowed range for this item is 1-4.
Repeats MuseSpark execution within one logical task. This is separate from a model-native output count.
Value: minimum 1; maximum 4.
Studio preset: 1.
No parameters match. Clear the search or reset the filters.
Model rules
Input modes
Select a mode by supplying its required public inputs. The mode identifier describes a documentation/form choice; do not send input_mode as a model parameter.
| Mode | Required inputs |
|---|---|
| Product Name | No reference media required |
| Reference Image | product_image |
Parameter meaning
- product_image provides a visual reference for the advertised product.
batch_size controls repeated MuseSpark executions. Output grouping, sequential image generation, and video shot count are separate concepts.
Request examples
Replace example media URLs and YOUR_... input identifiers with your own valid resources. Examples are checked against the exported item schema; media access and paid execution are separate runtime checks.
Set MUSESPARK_API_KEY and a stable MUSESPARK_REQUEST_ID before submitting. Preserve the request ID for retries of the same request and use a new ID for new work. Python examples use requests; JavaScript examples use Node.js 20 or later. The standalone Quickstart includes task polling and recovery.
Create an English product advertisement
curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
-H "Authorization: Bearer $MUSESPARK_API_KEY" \
-H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
-H 'Content-Type: application/json' \
-d '{
"item_key": "ai-video-ads",
"parameters": {
"duration": 10,
"language": "en",
"batch_size": 1,
"image": "https://example.com/presenter.jpg",
"product_name": "Ceramic travel cup",
"product_image": "https://example.com/travel-cup.png",
"text": "A reusable ceramic cup for your daily commute"
}
}'Parameters used: duration · language · batch_size · image · product_name · product_image · text.
Create an ad from a product name
curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
-H "Authorization: Bearer $MUSESPARK_API_KEY" \
-H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
-H 'Content-Type: application/json' \
-d '{
"item_key": "ai-video-ads",
"parameters": {
"duration": 10,
"language": "en",
"batch_size": 1,
"image": "https://example.com/presenter.jpg",
"product_name": "Ceramic travel cup",
"text": "A reusable cup for your commute"
}
}'Parameters used: duration · language · batch_size · image · product_name · text.
Output
The intended result is a processed or generated video asset.
Creation returns a task ID inside data. Poll that task until completion, then save data.result.output_urls and any data.result.batch_results. See the task lifecycle for terminal states, result retention, and errors.
Troubleshooting
The input does not match the intended operation. product_image provides a visual reference for the advertised product.
For rejected inputs, check the field type, accepted values, and conditional requirements in Request parameters and Model rules. Correct the affected fields before submitting again.
If creation times out, preserve the request identity and any known task ID. Follow Errors, timeouts and retries before submitting again.
Related docs
The public input snapshot was exported on 2026-11-09. Current prices and availability are listed in the model center.