About Lyria 3.5
Lyria 3.5 is Google DeepMind's music model. It turns one written brief of up to 5,000 characters into a finished stereo MP3, and can take an image to set the mood. Each request returns one track, priced per track whatever its length.
Call it with the model name google/lyria-3.5/text-to-audio on POST /jobs/createTask, from $0.12.
Introduction
Lyria 3.5 API for text to music
Google DeepMind’s Lyria 3.5 generates a music track from a written brief and delivers one MP3 through this text-to-audio endpoint. Describe genre, mood, instruments, tempo, structure and desired length in prompt to direct the composition.
Google says its Lyria 3.5 launch improved musicality, lyric handling and vocal expression. Our acoustic folk test below measures duration and processing time.
Submit a music request
Submit google/lyria-3.5/text-to-audio with the music brief inside input.prompt.
{
"model": "google/lyria-3.5/text-to-audio",
"input": {
"prompt": "Gentle acoustic folk instrumental, 100 BPM, picked guitar, warm bass and brushed percussion. Begin with guitar, add a restrained rhythm section, then close softly. Aim for 30 seconds."
}
}- Retain
data.taskIdfrom the accepted response. - Query
GET /api/v1/jobs/recordInfo?taskId=YOUR_TASK_IDwith the creating API key until the task reaches a terminal state. - On
succeeded, downloaddata.output.assets[0].url.
Read the task result
An accepted task returns an ID before the music is available. These abbreviated responses use placeholder identifiers and an example asset address:
{
"code": 200,
"data": {
"taskId": "job_YOUR_TASK_ID",
"state": "queued"
}
}{
"code": 200,
"data": {
"taskId": "job_YOUR_TASK_ID",
"state": "succeeded",
"output": {
"assets": [
{"url": "https://example.com/your-track.mp3"}
]
}
}
}Follow the task API documentation for the complete envelope. Inspect the terminal state before treating the returned record as a usable track.
Parameters and music direction
prompt carries the musical controls exposed by this endpoint. Tempo and length belong in its text rather than in separate numeric fields.
| Field or instruction | How to use it |
|---|---|
prompt | Supply the musical brief as text. |
| Genre and mood | Name a style and intended feeling, such as reflective acoustic folk. |
| Instruments | Identify the lead instrument and supporting parts. |
| Tempo | Write a BPM or pace into the description. |
| Structure | Describe the opening, development and ending. |
| Desired length | Include a length wish; verify the returned duration. |
| Unsupported fields | Omit image_url, duration, seed and output-format controls. |
Get a track that fits the project
A concrete arrangement brief gives you clear criteria for reviewing the music.
- State “instrumental” when you want music without a sung part.
- Choose a lead instrument and a small supporting ensemble so the intended mix is clear.
- Describe how the energy changes instead of stacking unrelated mood words.
- Change one part of the brief between takes, then compare the corresponding musical detail.
- Keep the MP3 you approve alongside the prompt so the chosen take remains available.
What our acoustic folk test showed
Our acoustic folk instrumental test returned 61.6 seconds of music after requesting 30 seconds at 100 BPM. Generation took approximately 30 seconds; the output was one MP3 at 44.1 kHz stereo and about 193 kbps.
| Test condition or measurement | Recorded value |
|---|---|
| Brief | Neutral acoustic folk instrumental |
| Requested tempo | 100 BPM |
| Requested length | 30 seconds |
| Actual duration | 61.6 seconds |
| Processing time | About 30 seconds |
| Audio | MP3, 44.1 kHz stereo, about 193 kbps |
This single result shows approximate length following, without establishing typical latency or quality across musical styles. Listen through the entire file for arrangement changes, then measure and trim it before synchronizing a precise video cut or podcast opening.
Limits and troubleshooting
Timing overruns require an editing pass because this endpoint has no dedicated duration setting. If a request fails, check that input contains the supported prompt field and review the returned error before submitting a revised brief.
Google says its music filters block requests for specific artist voices or copyrighted lyrics. Describe musical qualities and use text and voices you have the right to use; never impersonate a real person. Google’s model card also describes SynthID watermarking.
Choose a sibling for a different workflow
Choose this endpoint for a downloadable track whose arrangement and approximate length are described in text. Follow Google’s linked documentation to evaluate Clip for short cues or RealTime for streaming.
| Need | Choice to consider |
|---|---|
| A prompt-directed MP3 for an editing timeline | Lyria 3.5 text-to-audio |
| A fixed 30-second music clip | Google says Lyria 3 Clip generates 30-second clips. |
| Instrumental music steered during playback | Google describes Lyria RealTime as an interactive streaming model. |
| An exact cut or a prepared loop | Use an audio editor to trim or crossfade the downloaded track. |
Request parameters
| Parameter | Required | Description |
|---|---|---|
image_url | No | The picture to start from. |
prompt | Yes | Describe what you want to make. |
Pricing
Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your API balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
| Option | USD per run |
|---|---|
| Standard | $0.12 |
Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.
API quick start
Call the Lyria 3.5 API in three steps
- Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
- Send the request. POST /jobs/createTask with model google/lyria-3.5/text-to-audio and an input object that follows the parameter table. The response returns a task ID straight away.
- Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "google/lyria-3.5/text-to-audio",
"input": {
"prompt": "Calm ambient pads with a slow rising motif"
}
}'
# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $POPNOW_API_KEY"Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.
Lyria 3.5 API questions
How much does the Lyria 3.5 API cost?
Lyria 3.5 costs $0.12 per run. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your API balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
What is the model name for Lyria 3.5 in the API?
Put google/lyria-3.5/text-to-audio for Music in the model field of POST /jobs/createTask.
Can I set an exact duration for the music?
An exact duration cannot be enforced through a dedicated field on this endpoint. Our prompt requested a 30-second acoustic folk instrumental at 100 BPM, but the MP3 lasted 61.6 seconds. Treat the length request as guidance and trim the result for a precise placement.
How do I prompt Lyria 3.5 for an instrumental?
Specify “instrumental” in the prompt together with the instruments, tempo and musical progression you want. A useful brief might request calm folk at 100 BPM, picked guitar and soft percussion, with a quiet introduction and gentle close. Audition the result against that brief before using it.
What file format and sample rate does Lyria 3.5 return?
This endpoint returns one MP3 track at 44.1 kHz stereo, with about 193 kbps measured in the supplied test. It exposes no output-format selector, so convert the downloaded audio separately if your editor requires another encoding.
How long does a Lyria 3.5 generation take?
Our supplied acoustic folk test took about 30 seconds to produce a 61.6-second MP3. That observation covers one prompt and one run, rather than a latency distribution. Leave time to collect the file and assess its timing and arrangement.
Can I attach an image reference to this endpoint?
Image references are unsupported by this endpoint; send the musical description as prompt text. Translate the visual mood into genre, instruments, pace and structure instead of adding image_url.
What are the limits of the Lyria 3.5 API?
Prompt length (characters): 5,000; Largest upload: 20 MB. Requests outside these limits are rejected before anything is charged.
Can I try Lyria 3.5 without writing code?
Run Lyria 3.5 in the Playground with your API USD balance, without an API key. Each run appears in your developer history with its matching code.