Music API
Use the Music API when you want ReelForger to generate reusable background music before a render.
This is a separate asynchronous workflow from video rendering:
- submit a music generation request
- poll for completion
- receive 2 generated track URLs
- use one of those track URLs in a normal ReelForger render request
When to use this API
Use this path when:
- You want ReelForger to generate music from a prompt instead of supplying your own audio URL.
- You want a reusable audio asset before deciding which video render to build.
- You want to compare the 2 returned tracks and choose the best fit for a later render.
Do not use this path when:
- You already have your own music URL and just want to render a video.
- You expect music generation to happen inline inside a single
/v1/videos/renderor/v1/recipes/renderrequest.
Core behavior
- Every successful request costs exactly
20credits. - Every successful request always returns exactly
2tracks. - The returned
audio_urlvalues behave like standard public audio assets in ReelForger manifests. - Music generation is asynchronous, so you must poll the job until it reaches a terminal status.
- Like render requests, music generation requests can also include
metadata,webhook_url,webhook_headers,webhook_secret, andidempotency_key.
Endpoints
POST https://api.reelforger.com/v1/music/generate
Create a new music generation job.
Required auth:
Authorization: Bearer <API_KEY>
Optional headers:
idempotency-keyfor safe retries and deduplication
Optional body fields for async orchestration:
idempotency_keyas a payload-level dedupe keymetadataas flat key/value pairs echoed back in webhook eventswebhook_urlto receive async completion/failure callbackswebhook_headersfor custom outbound webhook headerswebhook_secretusing the same request shape as render jobs
GET https://api.reelforger.com/v1/music/jobs/{jobId}
Retrieve the current state of a music generation job.
The response includes:
- current
status billing_policycredit_costtracks[]once generation is complete
Request model
Simple mode
Simple mode is the default. Provide a prompt and ReelForger generates 2 tracks.
{
"prompt": "Cinematic lo-fi beat with a slow emotional build and no vocals",
"custom_mode": false,
"instrumental": true,
"model": "V5",
"idempotency_key": "music-gen-001",
"metadata": {
"make_scenario_id": "12345",
"campaign": "spring_launch"
},
"webhook_url": "https://api.example.com/reelforger/webhooks",
"webhook_headers": {
"X-Environment": "production"
}
}
Custom mode
Custom mode lets you provide stronger creative direction.
Rules:
styleis requiredtitleis required- if
instrumentalisfalse,promptis required and treated as lyric/source text - if
instrumentalistrue,promptis optional
{
"prompt": "",
"custom_mode": true,
"instrumental": true,
"model": "V5",
"style": "ambient, cinematic, warm synth, slow build",
"title": "Night Drive Bloom",
"negative_tags": "harsh drums, distortion, shouting"
}
End-to-end example
Step 1: Create a music generation job
curl -X POST "https://api.reelforger.com/v1/music/generate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "idempotency-key: music-gen-001" \
-d '{
"prompt": "Cinematic lo-fi beat with a slow emotional build and no vocals",
"custom_mode": false,
"instrumental": true,
"model": "V5",
"metadata": {
"make_scenario_id": "12345",
"campaign": "spring_launch"
},
"webhook_url": "https://api.example.com/reelforger/webhooks",
"webhook_headers": {
"X-Environment": "production"
}
}'
Example response:
{
"success": true,
"data": {
"job_id": "9e1d1a87-1c7c-4518-a7d6-b65e24f9e6af",
"billing_policy": "flat_20_credits",
"credit_cost": 20
},
"request_id": "req_abc123"
}
Step 2: Poll until completed
curl -X GET "https://api.reelforger.com/v1/music/jobs/9e1d1a87-1c7c-4518-a7d6-b65e24f9e6af" \
-H "Authorization: Bearer <YOUR_API_KEY>"
Completed example response:
{
"success": true,
"data": {
"id": "9e1d1a87-1c7c-4518-a7d6-b65e24f9e6af",
"status": "completed",
"billing_policy": "flat_20_credits",
"credit_cost": 20,
"tracks": [
{
"id": "track-1",
"audio_url": "https://assets.reelforger.com/music/night-drive-1.mp3",
"title": "Night Drive Bloom 1",
"duration": 87
},
{
"id": "track-2",
"audio_url": "https://assets.reelforger.com/music/night-drive-2.mp3",
"title": "Night Drive Bloom 2",
"duration": 91
}
]
},
"request_id": "req_abc124"
}
Using a returned track in a render
Once complete, pick one of the returned tracks[].audio_url values and use it exactly like any other audio asset.
curl -X POST "https://api.reelforger.com/v1/videos/render" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"version": "v1",
"output": { "width": 1080, "height": 1920, "fps": 30 },
"assets": [
{ "id": "clip1", "type": "video", "url": "https://example.com/clip1.mp4" },
{ "id": "music1", "type": "audio", "url": "https://assets.reelforger.com/music/night-drive-1.mp3" }
],
"composition": {
"timeline": [
{
"id": "video-1",
"type": "video",
"asset_id": "clip1",
"time": { "start_seconds": 0, "duration_seconds": 8 }
},
{
"id": "audio-1",
"type": "audio",
"asset_id": "music1",
"time": { "start_seconds": 0, "duration_seconds": 8 },
"media_settings": { "volume": 0.35, "loop": true }
}
]
}
}'
Status model
Music generation jobs use these states:
queuedprocessingcompletedfailed
When the job is:
queuedorprocessing:trackswill usually be emptycompleted:trackswill contain 2 generated songsfailed:error_messagewill describe the failure
If you provide webhook_url, ReelForger can also notify you asynchronously with:
music.generation.completedmusic.generation.failed
Cost and output summary
- Cost per successful request:
20credits - Output per successful request:
2distinct tracks - Best practice: compare both returned songs, choose the better one, then use that
audio_urlin your render