Music Generation API
Generate songs and instrumental tracks through one task-based API.
What is Music Generation API?
Create original music from text prompts, ideas, or lyrics. Generate full songs, background instrumentals, and soundtrack-style clips for apps, games, videos, and internal creative workflows.
Supported Models
Song Generation
Create complete songs from an idea or lyric draft
Instrumental Tracks
Generate background music without vocals
Short Music Variants
Generate multiple alternatives for selection and iteration
Quick Start
import requests, time
resp = requests.post(
"https://api.cheapaiapi.com/v1m/task/music-generation",
headers={"Authorization": "Bearer sk-your-key"},
json={
"title": "Night Drive",
"idea": "An upbeat electronic track with synth leads and a driving beat",
"n": 1,
"instrumental": True
}
)
task_id = resp.json()["task_id"]
while True:
status = requests.get(
f"https://api.cheapaiapi.com/v1/task/{task_id}",
headers={"Authorization": "Bearer sk-your-key"}
).json()
if status["status"] == "done":
print(status["metadata"]["music_result"]["data"][0]["audio_url"])
break
time.sleep(10)Why CheapAI?
Songs or Instrumentals
Work from an idea, a lyric sheet, or an instrumental-only brief.
Flexible Styles
Describe genre, mood, pacing, and instrumentation in plain language.
Multiple Variants
Generate several candidates, review results, and keep the strongest take.
Async Tasks
Workflow
1-3 tracks
Outputs
Idea or Lyrics
Input
Polling / Webhook
Delivery
Frequently Asked Questions
Can I generate songs with vocals?expand_more
Yes. Provide an idea or lyrics and review the returned task result for generated track URLs.
Can I create instrumental-only tracks?expand_more
Yes. Use the instrumental option when supported by the selected route.
How do I get the result?expand_more
The create call returns a task id. Poll GET /v1/task/:task_id or use receive_url for callbacks.
Can I request multiple variations?expand_more
Yes. Music generation supports multiple outputs in a single task where available.
Start Building Today
Get $2 in free credits. Create an API key, set spend controls if needed, and start testing the current task-based endpoints.
Get API Key arrow_forward