{"uid":"cap_YZ-uNvxLNByN9vct2n1qM","slug":"withzero-lyria-3-pro-song-generator-7446399a","name":"WithZero Lyria 3 Pro Song Generator","description":"Generate one to three complete songs with Google's Lyria 3 Pro, optionally translate vocal functions into instruments, master the audio, rank candidates with local DSP, and return hosted audio URLs.","url":"https://agents.withzero.xyz/api/v1/audio/songs/lyria-3-pro?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","example":{"prompt":"A short upbeat synthwave instrumental with a driving bassline"},"required":["prompt","candidateCount"],"properties":{"seed":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991,"description":"Seed for repeatable generation (best effort)."},"topP":{"type":"number","maximum":1,"minimum":0,"description":"OpenRouter nucleus-sampling probability from 0 to 1."},"prompt":{"type":"string","maxLength":4000,"minLength":1,"description":"Text description of the song to generate (1–4000 characters)."},"sections":{"type":"array","items":{"type":"object","required":["startSec","endSec","name","description"],"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"description":"Section label, for example Intro, Verse, Chorus, or Bridge."},"endSec":{"type":"integer","maximum":300,"minimum":1,"description":"Exclusive section end in whole seconds."},"startSec":{"type":"integer","maximum":300,"minimum":0,"description":"Inclusive section start in whole seconds."},"intensity":{"type":"integer","maximum":10,"minimum":1,"description":"Target section intensity from 1 (minimal) to 10 (maximum)."},"description":{"type":"string","maxLength":500,"minLength":1,"description":"Instrumentation, melody, rhythm, and production instructions for this section."}},"additionalProperties":false},"maxItems":20,"description":"Up to 20 ordered, non-overlapping arrangement sections converted to Lyria timestamp directives."},"mastering":{"type":"object","required":["targetLufs","truePeakDb","fadeOutSec"],"properties":{"fadeOutSec":{"type":"number","default":1,"maximum":10,"minimum":0,"description":"Final fade duration in seconds."},"targetLufs":{"type":"number","default":-14,"maximum":-8,"minimum":-24,"description":"Target integrated loudness in LUFS."},"truePeakDb":{"type":"number","default":-1,"maximum":-0.1,"minimum":-6,"description":"Maximum true peak in dBTP."}},"description":"Optional ffmpeg loudness normalization, true-peak control, and final fade. Omit to return Lyria audio unchanged.","additionalProperties":false},"durationSec":{"type":"integer","maximum":300,"minimum":30,"description":"Target duration in seconds (30–300; best effort)."},"temperature":{"type":"number","maximum":2,"minimum":0,"description":"OpenRouter sampling temperature from 0 to 2."},"instrumental":{"type":"boolean","description":"When true, explicitly excludes vocals, speech, vocal chops, and choir."},"candidateCount":{"type":"integer","default":1,"maximum":3,"minimum":1,"description":"Generate 1–3 seeded candidates. Extra candidates cost the normal per-song price; the objectively closest result is returned at top level."},"negativePrompt":{"type":"string","maxLength":1000,"minLength":1,"description":"Elements to discourage, appended to the Lyria prompt as explicit exclusions."},"tailReserveSec":{"type":"integer","maximum":15,"minimum":0,"description":"Reserve the final seconds for non-essential decay so an early model stop does not remove the musical resolution."},"selectionTarget":{"type":"object","properties":{"bpm":{"type":"number","maximum":240,"minimum":40},"matchPriorities":{"type":"object","properties":{"groove":{"type":"integer","maximum":5,"minimum":1},"harmony":{"type":"integer","maximum":5,"minimum":1},"structure":{"type":"integer","maximum":5,"minimum":1},"production":{"type":"integer","maximum":5,"minimum":1},"instrumentation":{"type":"integer","maximum":5,"minimum":1}},"description":"Optional 1–5 importance weights. Higher-weight traits receive stronger analysis, prompting, and candidate-ranking emphasis.","additionalProperties":false}},"description":"Optional BPM and match weights used to rank multiple candidates with local DSP.","additionalProperties":false},"referenceImageUrls":{"type":"array","items":{"type":"string","format":"uri","maxLength":2048},"maxItems":10,"description":"Up to 10 public reference images to guide mood, visual story, and style."},"instrumentalLeadMapping":{"type":"array","items":{"type":"object","required":["role","instrument"],"properties":{"role":{"enum":["lead","harmony","response","ad-lib","sustained","ensemble"],"type":"string","description":"The source vocal function being reassigned."},"register":{"enum":["low","mid","high","wide"],"type":"string"},"instrument":{"type":"string","maxLength":80,"minLength":1,"description":"Instrument that should perform this role, for example expressive piano or bright pluck synth."},"articulation":{"type":"string","maxLength":160,"minLength":1,"description":"Phrasing and envelope, for example clipped staccato attacks with short releases."}},"additionalProperties":false},"maxItems":8,"minItems":1,"description":"Map source vocal functions to instrumental parts such as lead → expressive piano and harmony → warm strings."},"instrumentalLeadContinuity":{"enum":["sectional","persistent"],"type":"string","description":"How strongly to retain the mapped lead instrument. Persistent reasserts it after every transition and prevents another instrument from replacing it."}},"additionalProperties":false},"responseSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["url","mimeType","sizeBytes","seconds","model","price_usdc"],"properties":{"url":{"type":"string","description":"Hosted URL of the generated song (MP3)."},"model":{"type":"string","description":"The model that produced the song."},"seconds":{"type":"number","description":"Approximate duration of the song in seconds."},"mimeType":{"type":"string","description":"Content type of the generated audio."},"sizeBytes":{"type":"number","description":"Size of the generated audio in bytes."},"candidates":{"type":"array","items":{"type":"object","required":["index","url","sizeBytes","seconds","score","diagnostics"],"properties":{"url":{"type":"string"},"seed":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991},"index":{"type":"integer","maximum":9007199254740991,"minimum":0},"score":{"type":"object","required":["overall","duration","groove","structure","production"],"properties":{"groove":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}]},"overall":{"type":"number","maximum":1,"minimum":0},"duration":{"type":"number","maximum":1,"minimum":0},"structure":{"anyOf":[{"type":"number","maximum":1,"minimum":0},{"type":"null"}]},"production":{"type":"number","maximum":1,"minimum":0}},"additionalProperties":false},"seconds":{"type":"number","exclusiveMinimum":0},"sizeBytes":{"type":"integer","maximum":9007199254740991,"exclusiveMinimum":0},"diagnostics":{"type":"object","required":["durationSec","tempo","brightness","energy","sections","cues"],"properties":{"key":{"type":"object","required":["tonic","mode","camelot","confidence"],"properties":{"mode":{"enum":["major","minor"],"type":"string"},"tonic":{"type":"string"},"camelot":{"type":"string"},"confidence":{"type":"number","maximum":1,"minimum":0}},"additionalProperties":false},"cues":{"type":"object","required":["mixInSec","mixOutSec"],"properties":{"mixInSec":{"type":"number","minimum":0},"mixOutSec":{"type":"number","minimum":0}},"additionalProperties":false},"tempo":{"type":"object","required":["bpm","beatOffsetSec","beatIntervalSec","downbeatOffsetBeats","downbeatConfidence"],"properties":{"bpm":{"type":"number","exclusiveMinimum":0},"beatOffsetSec":{"type":"number","minimum":0},"beatIntervalSec":{"type":"number","exclusiveMinimum":0},"downbeatConfidence":{"type":"number","maximum":1,"minimum":0},"downbeatOffsetBeats":{"type":"integer","maximum":3,"minimum":0}},"additionalProperties":false},"energy":{"type":"array","items":{"type":"number","maximum":1,"minimum":0}},"stereo":{"type":"object","required":["correlation","sideToMidRatio"],"properties":{"correlation":{"type":"number","maximum":1,"minimum":-1},"sideToMidRatio":{"type":"number","minimum":0}},"additionalProperties":false},"loudness":{"type":"object","required":["integratedLufs","rangeLu","truePeakDb"],"properties":{"rangeLu":{"type":"number"},"truePeakDb":{"type":"number"},"integratedLufs":{"type":"number"}},"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","required":["kind","startSec","endSec"],"properties":{"kind":{"type":"string"},"endSec":{"type":"number","exclusiveMinimum":0},"startSec":{"type":"number","minimum":0}},"additionalProperties":false}},"brightness":{"type":"array","items":{"type":"number","maximum":1,"minimum":0}},"durationSec":{"type":"number","exclusiveMinimum":0}},"additionalProperties":false}},"additionalProperties":false}},"price_usdc":{"type":"string","description":"The amount charged for this request, in USDC."},"diagnostics":{"type":"object","required":["final"],"properties":{"final":{"type":"object","required":["durationSec","tempo","brightness","energy","sections","cues"],"properties":{"key":{"type":"object","required":["tonic","mode","camelot","confidence"],"properties":{"mode":{"enum":["major","minor"],"type":"string"},"tonic":{"type":"string"},"camelot":{"type":"string"},"confidence":{"type":"number","maximum":1,"minimum":0}},"additionalProperties":false},"cues":{"type":"object","required":["mixInSec","mixOutSec"],"properties":{"mixInSec":{"type":"number","minimum":0},"mixOutSec":{"type":"number","minimum":0}},"additionalProperties":false},"tempo":{"type":"object","required":["bpm","beatOffsetSec","beatIntervalSec","downbeatOffsetBeats","downbeatConfidence"],"properties":{"bpm":{"type":"number","exclusiveMinimum":0},"beatOffsetSec":{"type":"number","minimum":0},"beatIntervalSec":{"type":"number","exclusiveMinimum":0},"downbeatConfidence":{"type":"number","maximum":1,"minimum":0},"downbeatOffsetBeats":{"type":"integer","maximum":3,"minimum":0}},"additionalProperties":false},"energy":{"type":"array","items":{"type":"number","maximum":1,"minimum":0}},"stereo":{"type":"object","required":["correlation","sideToMidRatio"],"properties":{"correlation":{"type":"number","maximum":1,"minimum":-1},"sideToMidRatio":{"type":"number","minimum":0}},"additionalProperties":false},"loudness":{"type":"object","required":["integratedLufs","rangeLu","truePeakDb"],"properties":{"rangeLu":{"type":"number"},"truePeakDb":{"type":"number"},"integratedLufs":{"type":"number"}},"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","required":["kind","startSec","endSec"],"properties":{"kind":{"type":"string"},"endSec":{"type":"number","exclusiveMinimum":0},"startSec":{"type":"number","minimum":0}},"additionalProperties":false}},"brightness":{"type":"array","items":{"type":"number","maximum":1,"minimum":0}},"durationSec":{"type":"number","exclusiveMinimum":0}},"additionalProperties":false},"beforeMastering":{"type":"object","required":["durationSec","tempo","brightness","energy","sections","cues"],"properties":{"key":{"type":"object","required":["tonic","mode","camelot","confidence"],"properties":{"mode":{"enum":["major","minor"],"type":"string"},"tonic":{"type":"string"},"camelot":{"type":"string"},"confidence":{"type":"number","maximum":1,"minimum":0}},"additionalProperties":false},"cues":{"type":"object","required":["mixInSec","mixOutSec"],"properties":{"mixInSec":{"type":"number","minimum":0},"mixOutSec":{"type":"number","minimum":0}},"additionalProperties":false},"tempo":{"type":"object","required":["bpm","beatOffsetSec","beatIntervalSec","downbeatOffsetBeats","downbeatConfidence"],"properties":{"bpm":{"type":"number","exclusiveMinimum":0},"beatOffsetSec":{"type":"number","minimum":0},"beatIntervalSec":{"type":"number","exclusiveMinimum":0},"downbeatConfidence":{"type":"number","maximum":1,"minimum":0},"downbeatOffsetBeats":{"type":"integer","maximum":3,"minimum":0}},"additionalProperties":false},"energy":{"type":"array","items":{"type":"number","maximum":1,"minimum":0}},"stereo":{"type":"object","required":["correlation","sideToMidRatio"],"properties":{"correlation":{"type":"number","maximum":1,"minimum":-1},"sideToMidRatio":{"type":"number","minimum":0}},"additionalProperties":false},"loudness":{"type":"object","required":["integratedLufs","rangeLu","truePeakDb"],"properties":{"rangeLu":{"type":"number"},"truePeakDb":{"type":"number"},"integratedLufs":{"type":"number"}},"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","required":["kind","startSec","endSec"],"properties":{"kind":{"type":"string"},"endSec":{"type":"number","exclusiveMinimum":0},"startSec":{"type":"number","minimum":0}},"additionalProperties":false}},"brightness":{"type":"array","items":{"type":"number","maximum":1,"minimum":0}},"durationSec":{"type":"number","exclusiveMinimum":0}},"additionalProperties":false}},"additionalProperties":false},"selectionNotes":{"type":"array","items":{"type":"string"}},"selectionMethod":{"type":"string","const":"local-dsp"},"selectedCandidate":{"type":"integer","maximum":9007199254740991,"minimum":0,"description":"Zero-based selected candidate index when candidateCount is greater than one."},"generationFailures":{"type":"integer","maximum":9007199254740991,"minimum":0}},"additionalProperties":false},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.08","displayCostAsset":"USD","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":1,"rating":{"score":"0.33","successRate":"0.33","reviews":1,"stars":"2.3","state":"rated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.08/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"},{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.08","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_eYu6t4MrQqLcjsOKIfj0T","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.08","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null},{"uid":"pm_l-KaRYIEABBFYBTYvbfJh","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.08","costPer":"request","priority":0,"asset":"0x20C000000000000000000000b9537d11c60E8b50","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a full AI-composed song from a text prompt using the Lyria 3 Pro model, billed per call via ZeroClick's pay-per-use proxy.","exampleAgentPrompt":"Can you generate a full song for me? I want something like an upbeat electronic dance track with driving synths and an energetic build-up — use seed 42 so I can reproduce it later.","exampleUseCases":[{"title":"Custom jingle for a product launch","prompt":"Generate a short catchy jingle for my new coffee brand called Morning Bloom — make it warm, acoustic, and optimistic, with a folksy strumming guitar vibe. Use seed 7 so I can regenerate it if needed."},{"title":"Background music for a YouTube video","prompt":"I need background music for a travel vlog — something cinematic and adventurous, sweeping strings with a building crescendo. Keep it instrumental and epic-feeling."},{"title":"Personalized song as a gift","prompt":"Create an original love song for my partner's birthday — romantic, slow, piano-led with soft vocals, lyrics about growing old together. Use seed 2024 so I can get the same version again."}],"resultDescription":"Returns a generated audio song file (or URL/binary) produced by the Lyria 3 Pro model matching the text prompt description, optionally reproducible with the provided seed value.","failureModes":["Prompt too short (minLength 1) or too long (maxLength 4000) returns validation error","Seed value outside integer range causes rejection","Payment failure via x402 micropayment protocol blocks the request","Model generation timeout for complex prompts","Non-deterministic output even with same seed (seed is best-effort only)"],"whenToPreferThis":"Choose this endpoint when you need on-demand AI music generation without setting up vendor accounts or API keys — ideal for agents autonomously creating audio content, producing background music, or generating songs as part of a larger automated workflow, billed transparently per call at $0.08 USDC.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":3,"lastUsedAt":"2026-07-31T13:29:04.062Z","lastSuccessfullyRanAt":"2026-07-31T13:29:04.062Z","lastHealthCheckAt":"2026-10-13T00:30:23.373Z","isFirstParty":true,"canonicalSlug":"withzero-lyria-3-pro-song-generator-7446399a"}