Google & Gemini

Google Lyria Music

DeepMind foundation music generation from natural language prompts.

Generate music with POST /v1/music. Send a JSON body with model, the prompt as text, and settings in params. The call waits up to 4 minutes; if the job is still running, read it with GET /v1/music/{job_id}.

Models: ace-step-1.5 (open source, up to 10 minutes, $0.20 per minute plus the $0.05 fee), lyria-3-pro-preview (full songs up to 180 seconds) and lyria-3-clip-preview (about 30 seconds). lyria-3.5 is temporarily unavailable.

Which model to pick

  • ACE-Step 1.5: full songs, 50+ languages. For real singing, send your own lyrics; left empty, it writes thin ones. It picks the length itself, and duration_seconds is only a hint. You pay for the length you get. Returns lyrics and song details, no timings.
  • Lyria 3 Pro: full songs up to about 3 minutes. Send lyrics or let it write them. It picks the length itself: duration_seconds is only a hint, and a 30-second request usually comes back between 50 and 116 seconds. Billed per song. Returns lyrics with the start of each section (verse, chorus), not of each line.
  • Lyria 3 Clip: always about 30 seconds, for jingles and loops. duration_seconds and negative_prompt are not used. Returns every line with its start and end.
  • For music without vocals, set instrumental to true on any of them.

Response

200 with the job. result.artifacts has one MP3 (44.1 kHz stereo) with a download url. result.duration is the real length in seconds. result.lyrics has the sung words. result.lyrics_lines lists each line. On Lyria 3 Clip every line has start and end. On Lyria 3 Pro only the first line of each section has start; every line has section_start and section_end, and result.lyrics_sections lists each section with start, end, and text. Times are in seconds and come from Google; an end Google leaves out is the next section start or the end of the song. result.caption describes the arrangement. To poll, use GET /v1/music/{id} or GET /v1/jobs/{id}. There are no per-word timings; for those, run the vocals through POST /v1/stem-separation and then a speech-to-text model with word timestamps.

Parameters

FieldTypeDescription
textRequiredstringTop level of the body, not inside params. The music to make: genre, instruments, mood, and style. prompt is accepted as the same field.
params.lyricsstringWords to sing, up to 5000 characters. Section tags like [Verse] and [Chorus] are allowed. Omit it and the model writes the lyrics.
params.instrumental
Default false
booleanNo vocals. lyrics is ignored when this is true.
params.duration_secondsintegerLyria 3 Pro: 30, 60, 90, 120, or 180, as a hint only. Pro usually returns a longer song (30 s requests came back 50 to 116 s); result.duration has the real length. Lyria 3 Clip ignores it and always returns about 30 seconds.
params.bpm
Default 120
integerTempo in beats per minute, 40 to 240.
params.negative_promptstringInstruments, styles, or sounds to leave out, for example vocals. Up to 500 characters.
params.temperature
Default 1.0
number0.0 to 2.0. Higher varies the take more.
params.seedintegerFixes the take, so the same body returns the same music.

Code example

curl https://api.pascalai.co/v1/music \
  -H "Authorization: Bearer $PASCAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "lyria-3-pro-preview",
  "text": "Upbeat pop song about a cat, bright synths, female vocal.",
  "params": {
    "duration_seconds": 60,
    "lyrics": "[Verse]\nSunbeam on the floor, you want more\n[Chorus]\nYou are the king of the house"
  }
}'

curl https://api.pascalai.co/v1/music/$JOB_ID \
  -H "Authorization: Bearer $PASCAL_API_KEY"