Music Video Generator API Documentation

Music Video Generator API Documentation

Playground

Try it on WaveSpeedAI!

AI Music Video Generator transforms audio + a single photo into a full music video with cinematic camera angles, smooth transitions, and perfect lip sync. Up to 10 minutes, 480p or 720p. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Features

The world’s best AI music video (MV) generator. Turn any song + a single photo into a professional-quality music video in minutes.

Why It’s the Best

  • Blazing fast: Generate a full 1-minute music video in just a few minutes. No waiting hours.
  • Perfect lip sync: Vocal-aware segmentation ensures the singer’s lips match the audio precisely throughout the entire video.
  • Cinematic quality: AI director plans each scene with different camera angles, compositions, and natural lighting — like a real music video shoot.
  • One photo is all you need: Upload a single portrait and the AI handles the rest — scene creation, angle variations, and smooth transitions.
  • Up to 10 minutes: Create full-length music videos, not just short clips.
  • Smart scene planning: Automatically detects vocal phrases and silence in the audio to create natural scene transitions at musically meaningful moments.

How It Works

  1. Upload your audio — any song, any genre, up to 10 minutes.
  2. Upload 1-3 reference images (optional) — the person who will appear in the video.
  3. Describe the scene (optional) — e.g. “A woman sings in a forest while playing a guitar”.
  4. Choose aspect ratio — 16:9 (landscape) or 9:16 (portrait/vertical).
  5. Select resolution — 480p or 720p.
  6. Get your music video — fully rendered with transitions, multiple angles, and synced audio.

What Happens Behind the Scenes

  1. Vocal isolation — Separates vocals from instruments to analyze singing patterns.
  2. Smart segmentation — Splits the audio at natural phrase boundaries (not arbitrary fixed intervals).
  3. AI directing — A vision-language model plans each scene: camera angles, compositions, expressions, and camera movements.
  4. Scene generation — Creates unique starting frames for each segment from different angles.
  5. Video synthesis — Generates lip-synced digital human video for each segment.
  6. Cinematic assembly — Smooth crossfade transitions between scenes, with the original audio layered on top for perfect sync.

Pricing

> Billing duration: The price depends on the length of the uploaded audio, rounded up to whole seconds. The minimum billed duration is 3 seconds; shorter audio is billed as 3 seconds. Audio longer than 10 minutes is billed as 10 minutes.

Price by audio length and output resolution:

Audio length480p720p
3 s or less (minimum)$0.09$0.18
5 s$0.15$0.30
10 s$0.30$0.60
30 s$0.90$1.80
1 minute (60 s)$1.80$3.60
2 minutes (120 s)$3.60$7.20
5 minutes (300 s)$9.00$18.00
10 minutes (600 s, maximum)$18.00$36.00

A request with default settings (480p) is $0.09.

Billing Rules

  • Charged per second of audio: the price grows with the audio length, for example 5 seconds of audio at 480p is $0.15 and at 720p is $0.30.
  • HD (720p) rate: 720p costs twice as much as 480p for the same audio length (10 s of audio: $0.30 at 480p, $0.60 at 720p).
  • Minimum Charge: 3 seconds ($0.09 at 480p, $0.18 at 720p).
  • Billing Cap: 600 seconds (10 minutes), at most $18.00 at 480p and $36.00 at 720p.

Parameters

ParameterRequiredDescription
audioYesURL of the audio/music file
imagesNoArray of 1-3 reference image URLs
promptNoScene/style description
aspect_ratioNo”16:9” or “9:16” (auto if omitted)
resolutionNo”480p” (default) or “720p”

Tips

  • Best results with vocals: The AI uses vocal patterns for scene timing. Songs with clear vocals produce the best-timed transitions.
  • Portrait photos work best: Clear, front-facing photos with visible face give the best identity preservation.
  • Be descriptive: A good prompt like “A rock singer performing on a neon-lit stage” gives much better results than just “singer”.
  • No photo? No problem: If you don’t provide images, the AI will generate a performer based on the detected voice (male/female).

Note

  • Max audio length: 10 minutes (600 seconds)
  • Processing speed: A 1-minute music video typically completes in 3-6 minutes
  • Supported audio formats: MP3, WAV, AAC, and most common formats
  • The AI automatically handles scene planning, you don’t need to specify individual scenes

Authentication

For authentication details, please refer to the Authentication Guide.

API Endpoints

Submit Task & Query Result

set -euo pipefail

export WAVESPEED_API_KEY="your-api-key"

REQUEST_BODY=$(cat <<'JSON'
{
  "audio": "https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3",
  "aspect_ratio": "16:9",
  "resolution": "480p"
}
JSON
)

# 1. Submit the prediction once. Never retry this request automatically:
# a retry after an unclear failure can create a second, billed task.
CHECK='The task may already exist. Check History or the predictions list before submitting again.'
if ! SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
  --connect-timeout 10 --max-time 60 \
  -X POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/music-video-generator" \
  -H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
  -H "Content-Type: application/json" \
  -d "${REQUEST_BODY}"); then
  printf 'Submit failed. %s\n' "${CHECK}" >&2
  exit 1
fi

TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
  printf 'Submission response did not contain a prediction id. %s\n' "${CHECK}" >&2
  exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"

# 2. Poll until the prediction reaches a final status.
BODY_FILE=$(mktemp)
trap 'rm -f "${BODY_FILE}"' EXIT
while true; do
  # Transient errors (429, 5xx) are retried, honoring Retry-After.
  HTTP_CODE=$(curl --silent --show-error --fail-with-body \
    --connect-timeout 10 --max-time 60 --retry 5 --retry-delay 2 \
    --output "${BODY_FILE}" --write-out '%{http_code}' \
    "${RESULT_URL}" \
    -H "Authorization: Bearer ${WAVESPEED_API_KEY}" || true)
  case "${HTTP_CODE}" in
    2??) ;;
    000|429|5??)  # dropped connection or temporary error: keep polling
      printf 'Task %s: HTTP %s, polling again in 10s\n' "${PREDICTION_ID}" "${HTTP_CODE}" >&2
      sleep 10; continue ;;
    *) printf 'Task %s: HTTP %s\n' "${PREDICTION_ID}" "${HTTP_CODE}" >&2
      cat "${BODY_FILE}" >&2; exit 1 ;;
  esac
  RESULT=$(jq 'if type == "object" and has("data") then .data else . end' "${BODY_FILE}")
  STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')

  case "${STATUS}" in
    completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
    failed|cancelled|timeout|deleted)
      printf 'Task %s ended with status %s\n' "${PREDICTION_ID}" "${STATUS}" >&2
      printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
    *) sleep 2 ;;
  esac
done

Retry temporary errors only while polling, never the submit request. Errors, retries and timeouts

Parameters

Task Submission Parameters

Request Parameters

ParameterTypeRequiredDefaultRangeDescription
audiostringYes--The audio/music file URL for generating the music video.
imagesarray<string>No-0 ~ 3 itemsList of reference image URLs (1-3 images). The person in the images will appear throughout the video.
promptstringNo-Style and scene description for the music video (e.g. "A woman sings in a forest while playing a guitar").
aspect_ratiostringNo-16:9, 9:16Aspect ratio of the output video. If not specified, auto-detected from input images.
resolutionstringNo480p480p, 720pThe resolution of the output video.

Every model also accepts the global request options enable_sync_mode and enable_base64_output; see their pages for details.

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
data.idstringUnique identifier for the prediction, Task Id
data.modelstringModel ID used for the prediction
data.outputsarrayOutput values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.statusstringTask status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses.
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds

Result Request Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID

Result Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
dataobjectThe prediction data object containing all details
data.idstringUnique identifier for the prediction
data.modelstringModel ID used for the prediction
data.outputsarray<string | object>Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model.
data.urlsobjectObject containing related API endpoints
data.statusstringStatus: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses
data.created_atstringISO timestamp of when the request was created
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds
© 2026 WaveSpeedAI. All rights reserved.