Google Lyria 2 API
$0.10/song on Varosity credits ($0.10/song with your own key).
no fal.ai account needed · provider's list price, no markup · failed renders never billed
Best for
- instrumental detail
- short 30 s cues
Trade-offs
- no vocals
How to get the best result
Detailed instrumental cues of about 30 seconds (beds, stingers, background loops). Pick instead: elevenlabs-music for other lengths or vocals; suno-v4 for full songs.
Prompting
- Write a detailed US-English description of genre, mood, instrumentation and tempo; detail improves results.
- Lyria is instrumental only; do not ask for vocals or lyrics.
Settings on Varosity
- Always returns one ~30s clip regardless of durationSec.
- tags are appended to the prompt as 'Genre/mood: ...'; Lyria's negative_prompt is not forwarded.
Avoid
- Requesting longer tracks; you still get 30s.
- Prompts naming artists; Google applies artist-intent and recitation checks.
Example prompt
A calm acoustic folk piece with fingerpicked guitar, soft cello and light brushed percussion, gentle and hopeful, around 90 BPM.
From docs.cloud.google.com, fal.ai, checked against what Varosity sends.
Call it from your code
One Varosity key works for every model.
curl -X POST https://varosity.ai/api/v1/music \
-H "Authorization: Bearer $VAROSITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"modelId": "lyria-2",
"prompt": "upbeat lo-fi hip hop with warm keys, 90 bpm",
"durationSec": 30
}'Or use Google Lyria 2 over MCP
Connect ChatGPT, Claude, Cursor or any MCP client to https://varosity.ai/api/mcp (sign in, or use your key), then say:
"Use Varosity with lyria-2 to compose 30 seconds of …"MCP setup for your agent