One API for music generation
Submit music generation jobs, poll their status, and retrieve all delivered tracks through one REST API.
Quickstart
Create an API key
After signing in, create an API key starting with ss_. The key is shown only once.
Submit a task
Send a prompt and provider; the API returns HTTP 202.
Poll for results
Poll by task ID until the status is complete or failed.
Instrumental example
curl --request POST https://zaoyue.ai/v1/songs/generate \
--header "Authorization: Bearer $ZAOYUE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"provider": "suno",
"model": "v6",
"prompt": "Warm cinematic score, piano-led, slowly unfolding",
"makeInstrumental": true
}'Example response
{
"id": "song_abc123",
"status": "pending",
"provider": "suno",
"model": "v6",
"creditsCharged": 5
}Models & availability
Lyria prompt-only jobs are instrumental. Pass lyrics via custom-generate for vocals.
Suno: public model ID v6. Lyria: lyria. These are Zaoyue API identifiers, not official provider version labels. Mureka is not publicly available.
Current credits, supported operations and expected output counts: Pricing · GET /v1/credits/pricing
Zaoyue is an independent integration service using Suno and Lyria via a third-party supplier. It is not an official API of the listed model providers and does not claim to have trained the models.
Use POST /songs/generate for prompt-driven generation and POST /songs/custom-generate to submit custom lyrics (Lyria returns a song with vocals). Output counts differ by provider, so always read the tracks array.
Task lifecycle
Poll task status every 3–5 seconds. Tasks in the failed state return the full generation charge as credits. The needs_review state means we are still confirming the submit. Keep polling and do not start another generation. If no accepted task or deliverable result can be confirmed, the song becomes failed and the credits charged for that run are returned.
Auth & errors
Send the header Authorization: Bearer ss_....
See the full API reference for JavaScript and Python examples, full response schemas, billing details and edge cases.
Ready to start?
Sign in to the console, create an API key, and run your first generation in minutes.