Skip to main content
Type a vibe, get a track. Your agent turns a one-line brief into a rich music prompt with Claude, then pays Stable Audio 2.5 to render the actual audio — a real, commercial-use .wav you can play and sell. ~$0.42, no API keys, no subscriptions.
This recipe is the creation half of the Audric Store demo “Make me a lo-fi beat called Midnight Rain and sell it for $5.” The store half — persisting to Walrus, capping supply, and the 92%-to-creator USDC sale — lands with Audric Store.Why pay for a model when a capable client could DIY? An agent with a code sandbox (e.g. Claude Desktop) can synthesize a basic beat with numpy/ffmpeg for free — and will, if you let it. But that’s a hand-built waveform, not generative music. When the point is a real, sellable track (“AI made the music”), you want a generative model — that’s what the paid call buys here. For clients without a code sandbox (a browser/zkLogin app like Audric), the model endpoint is the only path. Phrase the prompt to ask for model generation when quality matters.

The prompt


What runs

  1. POST /anthropic/v1/messages — Claude turns the brief into a vivid music prompt (~$0.02)
  2. POST /fal/fal-ai/stable-audio-25/text-to-audio — Stable Audio 2.5 renders the track (~$0.40)

Run it

Claude Desktop (MCP)

Paste the prompt. Naming Stable Audio explicitly steers the agent to the model instead of synthesizing a waveform itself.

SDK


Expected output


Extend it

  • Need a cheaper take? MusicGen via Replicate (/replicate/v1/predictions, $0.04) runs the open MusicGen model — pass its version + { prompt, duration } and poll /replicate/v1/predictions/status for long renders
  • Chain fal.ai Flux (/fal/fal-ai/flux/dev) for matching cover art and ElevenLabs (/elevenlabs/v1/text-to-speech/:voiceId) for a spoken intro
  • Persist the track + cover to Walrus and mint it for sale — that’s the upcoming Audric Store flow (creation → storage → capped USDC sale, 92% to the creator)