Use case

Video Editing Music API

Video-editor and creator-tool builders who want users to generate a fitting soundtrack instead of searching a stock library.

The problem

In a video tool, the music step is where users stall. Browsing a stock library breaks the editing flow, and the clip they pick rarely matches the cut. You need a way for the editor to request a track that fits the mood and length of the timeline, on demand.

Why MusicAPI fits this

Generate a track that matches a described mood and energy, so it fits the cut instead of approximating it.

Full commercial rights on output, so creators can publish and monetize the exported video without clearance.

REST job-plus-poll flow fits an editor backend: kick off generation, show progress, drop the audio onto the timeline.

Code sample

A real request against the live API: start a job, then poll the task endpoint until the audio is ready.

curl
# Generate a soundtrack matched to a video's mood
# 1. Start a generation job
curl -X POST https://api.musicapi.ai/api/v1/sonic/create \
  -H "Authorization: Bearer $MUSICAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "custom_mode": true,
    "mv": "sonic-v5",
    "prompt": "A cinematic instrumental that builds toward an emotional peak",
    "tags": "cinematic, building, emotional strings",
    "title": "The Reveal",
    "make_instrumental": true
  }'

# Response: { "message": "success", "task_id": "a1b2c3d4-..." }

# 2. Poll until the audio is ready (state: "succeeded")
curl https://api.musicapi.ai/api/v1/sonic/task/a1b2c3d4-... \
  -H "Authorization: Bearer $MUSICAPI_KEY"

# Response data[].audio_url is a ready-to-stream MP3 once state is "succeeded".

Pricing

MusicAPI is pay-as-you-go with credit packs, plus predictable monthly subscriptions. The per-credit rate is the same across packs and subscriptions. See the pricing page for current rates, free credits, and volume options.

FAQ

How do I match music to the length of a clip?

Generate a base track for the mood, then use the extend endpoint to reach the duration your timeline needs. Poll the task endpoint for the finished audio at each step.

Can users export and monetize the video?

Yes. Every generation includes full commercial rights, so a creator can publish and monetize the exported video without separate music clearance.

What format should I drop onto the timeline?

The task response returns a streamable MP3 audio_url. For editors that need lossless audio on the timeline, request WAV through the dedicated WAV endpoint.

Build it in 5 minutes

Get free credits on signup and run real generations before any payment. No credit card required to start.

API details verified 2026-05-16. The API surface evolves; the pricing page always has current rates.