Skip to main content
One API, every provider

Music Generation API

Generate music from text through one API — full tracks, loops, and instrumentals with flat per-output pricing, returned as hosted audio files ready to stream or download.

3 music generation models available right now — every one runnable in a free playground, through the REST API and JavaScript SDK, or from an AI assistant via MCP.

Music Generation models & pricing

ModelEndpointPrice
Stable Audio 2.5stability-ai/stable-audio-2.5/text-to-audio$0.2 per audio clip
Lyria 2google/lyria2$0.1 per audio clip
ACE-Stepace-studio/ace-step$0.0002 per second of video

Full catalog on the models page; live per-configuration costs on the pricing page.

Call a music generation model in one request

Every model shares the same request lifecycle: submit to the queue, poll the status URL, fetch the result. Swap the endpoint to switch models — nothing else changes.

cURL

curl -X POST https://queue.modelrunner.run/stability-ai/stable-audio-2.5/text-to-audio \
  -H "Authorization: Key $MRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "input": { "prompt": "..." } }'
# → { "request_id": "...", "status_url": "...", "response_url": "..." }

Use music generation models from Claude & Cursor

Connect the ModelRunner MCP server once and your AI assistant can run every music generation model in this table as a tool — authorized via OAuth, results returned as hosted URLs in the conversation.

Claude Code

claude mcp add --transport http modelrunner https://mcp.modelrunner.run/mcp

Frequently asked questions

How much does a music generation API cost?

Music models on ModelRunner are priced per generated track (flat per-output), with the exact rate per model shown in the table above. You pay per generation from prepaid credits — no subscription tiers.

How do I call a music generation model via the API?

Every model shares the same request shape: POST https://queue.modelrunner.run/<owner>/<alias> with an Authorization: Key header and an {"input": {...}} body, then poll the returned status_url and fetch the result from response_url. The JavaScript SDK (@modelrunner/client) wraps this in a single subscribe() call. Each model page shows copy-paste cURL, JavaScript, and Python examples with that model's real inputs.

Can I run music models from Claude or Cursor?

Yes. Connect the ModelRunner MCP server (https://mcp.modelrunner.run/mcp) once and every music model in the catalog becomes a tool your AI assistant can call with the run_model tool — authorized via OAuth, no API key pasted into config.