Producer API#
The Producer API generates studio-quality music, lyrics, and music videos from a text prompt. It is well-suited for ambient, cinematic, electronic, and instrumental tracks where you want a single fixed-length output rather than the multi-clip / extend / cover workflow used elsewhere in the platform.All Producer endpoints are asynchronous: you submit a request, receive a task_id, and either poll GET /api/v1/producer/task/{task_id} or register a webhook_url to be notified when the task completes.
Base URL#
https://api.aimusicapi.ai
Authenticate with a Bearer token in the Authorization header:
Endpoints#
| Method | Path | Purpose | Cost |
|---|
| POST | /api/v1/producer/create | Generate a music clip from a text prompt | 10 credits |
| POST | /api/v1/producer/lyrics-create | Generate lyrics from a text prompt | 1 credit |
| POST | /api/v1/producer/video-clip | Render a music video from an existing clip | 5 credits |
| POST | /api/v1/producer/upload | Submit an external audio URL for use as clip_id reference | 2 credits |
| POST | /api/v1/producer/download | Request a re-encoded download (mp3 or wav) of an existing clip | 2 credits |
| GET | /api/v1/producer/task/{task_id} | Poll task status / retrieve results | Free |
Polling GET /api/v1/producer/task/{task_id} is free regardless of which producer endpoint started the task — make_lyrics, video_clip, upload, download, and music generation all use the same poll path.Auto-refund on failure. If a task fails on the upstream provider side, the credits charged at submit time are automatically refunded to your account.
Task Types#
The task_type field on POST /api/v1/producer/create selects what the endpoint produces. Currently only create_music is supported on /create. The lyrics and video-clip operations have their own dedicated endpoints (/lyrics-create and /video-clip) and should not be invoked through /create.The full set of task_type values that may appear in a polling response is:| task_type | Started by | Description |
|---|
create_music | POST /api/v1/producer/create | Generates a music clip from a sound prompt and/or lyrics. |
make_lyrics | POST /api/v1/producer/lyrics-create | Generates lyrics text from a prompt. |
video_clip | POST /api/v1/producer/video-clip | Renders a music video from an existing clip. |
upload | POST /api/v1/producer/upload | Registers an external audio URL as a reference clip. |
download | POST /api/v1/producer/download | Re-encodes a clip into mp3 or wav for direct download. |
Retired task types — return HTTP 410 Gone#
The following task_type values were supported on a previous version of this API and are now permanently retired by the upstream provider. Submitting any of them to POST /api/v1/producer/create returns HTTP 410 Gone with type: "endpoint_retired". There are no plans to bring them back.cover_music
cover_upload_music
extend_music
extend_upload_music
replace_music
replace_upload_music
swap_music_vocals
swap_upload_music_vocals
swap_music_sound
swap_upload_music_sound
music_variation
If you previously used any of these, the recommended replacement is to call create_music with a fresh prompt — the new generation pipeline does not support stitching, replacing, or covering a prior clip.
Models (mv field)#
The mv field on POST /api/v1/producer/create selects the generation model. Default is FUZZ-2.0 if mv is omitted.| Value | Notes |
|---|
FUZZ-3-Demo | Latest demo model |
FUZZ-2.0 | Default, balanced quality / latency |
FUZZ-2.0 Pro | Higher quality, slower |
FUZZ-2.0 Raw | Less post-processing, more "demo-tape" feel |
FUZZ-1.1 Pro | Legacy, kept for backward compatibility |
FUZZ-1.1 | Legacy |
FUZZ-1.0 Pro | Legacy |
FUZZ-1.0 | Legacy |
FUZZ-0.8 | Legacy |
Submitting any value outside this list returns 400 Bad Request with a validation error.
Output URLs#
Successful tasks return media files (audio_url, wav_url, image_url, video_url) hosted on our own CDN:https://musicapi-cdn.b-cdn.net/producer/{clip_id}.m4a
https://musicapi-cdn.b-cdn.net/producer/{clip_id}-wav.wav
https://musicapi-cdn.b-cdn.net/producer/{clip_id}-img.jpg
https://musicapi-cdn.b-cdn.net/producer/{clip_id}-video.mp4
URLs are stable and cacheable. Files remain available indefinitely under our retention policy. You should not infer or rely on any other host — URL hosts may change between releases without notice.
Webhooks#
Every Producer endpoint accepts an optional webhook_url (HTTPS, ≤ 1024 chars) and webhook_secret. When the task completes (success or failure), we POST the polling response payload to the URL with an X-Webhook-Signature header containing the HMAC-SHA256 of the body using your secret.Webhooks are best-effort with retries; if your endpoint returns non-2xx, we retry with exponential backoff for several attempts before giving up. Always also support polling as a fallback.
Common response envelope#
All polling responses share this shape:{
"code": 200,
"message": "success",
"data": [ ],
"status": "SUCCESS"
}
status is one of: PENDING, RUNNING, SUCCESS, FAILED. Continue polling while the value is PENDING or RUNNING.
Errors#
| HTTP | type | Meaning |
|---|
| 400 | validation_error | A required field is missing, has the wrong type, or mv is not in the allowed list |
| 401 | unauthorized | Missing or invalid Bearer token |
| 402 | insufficient_credits | Not enough credits / wrong subscription tier |
| 410 | endpoint_retired | task_type is in the retired list above |
| 429 | rate_limited | Too many in-flight tasks — wait and retry |
| 500 | internal_error | Server-side fault |
| 502 | upstream_error | The underlying generation provider is unavailable — retry after a short backoff |
Rate limits & concurrency#
Each account has a per-task-type concurrency limit. If you exceed it you'll get 429 rate_limited; back off and retry. Daily/monthly volume limits depend on your plan.For high-volume workloads (>1k tasks/day), reach out at support@aimusicapi.ai to discuss enterprise pricing and dedicated rate limits.Need Help?#
Modified at 2026-04-27 16:54:37