{"uid":"cap_jcVNnKgrnUk4mWpc8nDdR","slug":"haven-music-generation-api-892f829b","name":"Haven Music Generation API","description":"Generate a music track. Poll statusUrl, download at resultUrl. SFW only.","url":"https://api.havenagent.ai/x402/api/v1/music","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"lyrics":{"type":"string","maxLength":5000},"prompt":{"type":"string","maxLength":2000,"minLength":1},"durationSeconds":{"type":"number","default":20,"maximum":60,"minimum":1}}},"responseSchema":{"type":"json","example":{"kind":"music","jobId":"00000000-0000-0000-0000-000000000000","status":"queued","resultUrl":"https://api.havenagent.ai/x402/api/v1/music/jobs/00000000-0000-0000-0000-000000000000/result","statusUrl":"https://api.havenagent.ai/x402/api/v1/music/jobs/00000000-0000-0000-0000-000000000000","etaSeconds":60,"pollBudgetSeconds":900}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_y06SqtBFZOWmZL-q7r2Tu","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates AI music audio from a text prompt and optional lyrics, returning a job ID to poll for the resulting audio file","exampleAgentPrompt":"Can you generate a 30-second upbeat jazz tune for my home — something warm and relaxed with a piano lead, no lyrics needed?","exampleUseCases":[{"title":"Custom song for a birthday celebration","prompt":"Write and generate a fun 45-second birthday song with these lyrics: 'Happy birthday to you, may all your dreams come true, wishing you the best day ever!' — make it upbeat and pop-sounding."},{"title":"Ambient background music for a home scene","prompt":"Create a 60-second calm, atmospheric ambient music track for my evening wind-down routine — something soft and instrumental with no lyrics."},{"title":"Custom jingle for a smart home routine","prompt":"Generate a short 15-second energetic morning jingle to play when I wake up, something bright and motivating — no lyrics, just an upbeat melody."}],"resultDescription":"Returns a JSON object with a jobId, initial status (queued), a resultUrl to fetch the final audio once complete, a statusUrl to poll for progress, and an estimated completion time in seconds (typically around 60 seconds, with a poll budget of up to 900 seconds).","failureModes":["Invalid or missing prompt results in a 400 validation error","Duration outside 1–60 second range is rejected","Payment of 0.1 USDC not completed via x402 results in 402 Payment Required","Job may timeout if polling exceeds 900 seconds","Result URL may return 404 if job has expired or failed"],"whenToPreferThis":"Choose this endpoint when you need to generate original AI music audio — especially short clips (up to 60 seconds) — with optional custom lyrics, in a privacy-focused smart home context. Suitable for home automation agents that want to play personalized music on a Haven speaker or app. Prefer this over text-to-speech endpoints when you want actual musical output, not spoken word.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:40:54.388Z","isFirstParty":false}