Music generation is asynchronous. Submit a job, poll until it finishes, then
use the returned HTTPS URL. The API token must have the async audio scope.
New active external-customer tokens receive this scope by default. Existing
managed customer and project-token policies are upgraded automatically;
explicit policies remain unchanged. A restricted model allowlist must also
contain lyria-3-pro-preview.
Available model
| Model | Output | Maximum requested duration | Price |
|---|---|---|---|
lyria-3-pro-preview |
MP3 | 184 seconds | $0.08 per completed song |
duration_seconds guides the composition but is not a frame-exact duration
guarantee. A generated song can be shorter or longer than requested.
Create a music job
curl https://gateway.api429.com/v1/music/generations \
-H "Authorization: Bearer $API429_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: launch-theme-001" \
-d '{
"model": "lyria-3-pro-preview",
"prompt": "Cinematic synth-pop at 112 BPM, restrained verse, wide uplifting chorus",
"duration_seconds": 120,
"lyrics": "[Verse]\nCity lights begin to glow\n\n[Chorus]\nWe are ready, let it show",
"instrumental": false,
"output_format": "mp3"
}'
| Field | Type | Required | Notes |
|---|---|---|---|
model |
string | No | Defaults to lyria-3-pro-preview. |
prompt |
string | Yes | Musical direction, genre, mood, instruments, tempo and structure. |
duration_seconds |
integer | No | 1..184; treated as an approximate target. |
lyrics |
string | No | May include [Verse], [Chorus] and similar section tags. |
instrumental |
boolean | No | true cannot be combined with lyrics. |
output_format |
string | No | Currently mp3 only. |
google/lyria-3-pro-preview is accepted as an input compatibility alias and
is normalized to the canonical lyria-3-pro-preview ID in job responses.
Idempotency-Key is required. Reusing the same key with the same authenticated
client returns the original job instead of creating and charging for another
generation. A new key starts a new paid generation.
The submit response is HTTP 202:
{
"id": "job_...",
"object": "music.generation.job",
"status": "queued",
"model": "lyria-3-pro-preview"
}
Poll and retrieve the song
curl https://gateway.api429.com/v1/music/generations/job_... \
-H "Authorization: Bearer $API429_TOKEN"
While work is pending, the endpoint returns the current job status. A completed job returns:
{
"object": "music.generation",
"model": "lyria-3-pro-preview",
"data": [
{
"url": "https://cdn.example/song.mp3",
"mime_type": "audio/mpeg",
"bytes": 1544920,
"sha256": "..."
}
],
"billing": {
"charged_amount_usd": "0.08",
"unit_price_usd": "0.08",
"currency": "USD",
"pricing_status": "charged"
}
}
If the final upstream outcome cannot be determined safely, the job is marked
ambiguous and is not retried automatically. This prevents a second paid song
from being created behind the same job. Use a new idempotency key only after
checking the final status.
Quickstart: the first request · Models and prices · Get an API key