generate_music
Generate a full song with AI vocals from a style prompt plus lyrics — or an INSTRUMENTAL bed / underscore (background music under video narration, intros, outros) by sending ONLY structure tags and no words. You choose the length: 15-300 seconds at 5 sats/second (75-1500 sats). Specify BPM, key, genre, mood in prompt. Returns a 44.1 kHz 16-bit stereo WAV URL. Structure tags must each be on their OWN line — words on a tag line are DROPPED by the model, which silently shortens the song. Don't want to write lyrics? Set lyricsAddon:true (+25 sats) and optionally lyricsAbout to say what they should be about. Pay per request with Bitcoin Lightning — no API key or signup needed. Requires create_payment with toolName='generate_music' AND the same duration (the price is bound to it).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lyrics | No | Song lyrics with section tags (up to 3,500 chars). Each tag on its OWN line, words on the lines after it — words sharing a line with a tag are dropped. Tags: [intro], [verse], [pre-chorus], [chorus], [post-chorus], [bridge], [instrumental], [solo], [outro]. Send only tags and no words for an instrumental. | |
| prompt | Yes | Music style with BPM, key, genre, mood, instruments (up to 2,000 chars). Example: 'E minor, 90 BPM, acoustic guitar ballad, male vocal' | |
| modelId | No | Optional. Omit for default model. | |
| duration | No | Song length in seconds, 15-300. THE PRICE (5 sats/second) — must match the duration sent to create_payment. Default: 15 | |
| paymentId | Yes | Valid payment ID (must be paid) | |
| lyricsAbout | No | Optional, with lyricsAddon: what the lyrics should be about. Omit and the subject is inferred from your music prompt. | |
| lyricsAddon | No | Set true to have the lyrics written for you (+25 sats, billed on the song's own invoice). Must also be sent to create_payment. |