MuseSpark
MuseSpark
Models & toolsTools

Music Video Generator API guide

Music Video Generator API: Generate a music video from an audio track, with optional reference images and scene guidance.

Model overview

Generate a music video from an audio track, with optional reference images and scene guidance.

API integration

DocumentationValue
API invocation identifiermusic-video-generator
IntegrationAsync 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

Studio presets describe the form setup, not guaranteed server defaults. Send preset values explicitly to reproduce them.

audiostringNon-nullRequired

The audio/music file URL for generating the music video.

imagesarray<string>Non-nullOptional

List of reference image URLs (1-3 images). The person in the images will appear throughout the video.

Item count: maximum 3.

promptstringNon-nullOptional

Style and scene description for the music video (e.g. "A woman sings in a forest while playing a guitar").

resolutionstringNon-nullOptional

The resolution of the output video.

Allowed values: "480p", "720p".

Studio preset: "480p".

aspect_ratiostringNon-nullOptional

Aspect ratio of the output video. If not specified, auto-detected from input images.

Allowed values: "16:9", "9:16".

Studio preset: "16:9".

batch_sizeintegerNon-nullOptional

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

Parameter meaning

  • audio supplies the music; optional images guide the person appearing in the video. Use up to three references.

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 a music video with a performer reference

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": "music-video-generator",
  "parameters": {
    "batch_size": 1,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "audio": "https://example.com/original-song.mp3",
    "prompt": "A performer sings on a quiet beach at sunset",
    "images": [
      "https://example.com/performer.jpg"
    ]
  }
}'

Parameters used: batch_size · resolution · aspect_ratio · audio · prompt · images.

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. audio supplies the music; optional images guide the person appearing in the video. Use up to three references.

audio · images

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.

The public input snapshot was exported on 2026-11-09. Current prices and availability are listed in the model center.