Music generation APIs and MCP servers for AI agents
Generate songs, instrumentals, loops and sound effects from prompts.
6 music generation APIs an AI agent can call: auth method and header, official MCP server (1), free tier (1), docs links. Machine-readable JSON included. Agents: fetch catalog/music-generation.json instead of parsing this page. Last checked 2026-09-24.
Ratings and usage (★) fetched: .
| Service | What an agent can do | Auth | MCP server | Free tier | Details (with sources) | Notes | Proof (ratings, usage) |
|---|---|---|---|---|---|---|---|
| Beatoven.ai API | Generate royalty-cleared background music and sound effects from text prompts via REST API (Maestro). | API keyAuthorization: Bearer <API_TOKEN> (base URL https://public-api.beatoven.ai) | — | check pricing | Base URL: https://public-api.beatoven.ai Free plan: none ↗ Async jobs: POST /api/v1/tracks/compose returns task_id; poll GET /api/v1/tasks/{task_id} until status 'composed' ↗ | Auth and endpoints are documented in the public API spec on GitHub (Beatoven/public-api); free-credit amount is not disclosed on public pages. | SourceForge 3.8★/4 reviews |
| ElevenLabs Music API | Generate original music tracks from text prompts or detailed composition plans via REST API, with commercial licensing. | API keyxi-api-key: <API_KEY> | official | Free tier: 10,000 credits per month shared with TTS (music included, no commercial use of music on Free; Starter $6/mo or higher needed) | Base URL: https://api.elevenlabs.io Free plan: 10k credits (music included, no commercial use on free plan), per month ↗ Rate limits: Concurrency-based: Free plan 2 concurrent requests (TTS figures; higher on paid plans) ↗ Example call: generate a music track from a text prompt: POST https://api.elevenlabs.io/v1/music ↗ Unit price: Music generation $0.15 per minute of generated audio (API, all paid tiers); finetune $1.50 each ↗ | Endpoint POST /v1/music; models music_v1/v2/v2.5; billed from the same ElevenLabs credit pool as TTS. Hosted OAuth MCP at api.elevenlabs.io/v1/mcp; the elevenlabs-mcp repo is archived since 2026-08-20. | GitHub 1,537★ elevenlabs/elevenlabs-mcp |
| Loudly API | Generate, remix, stem-split, and master music tracks programmatically via REST API. | API keyAPI-KEY: <API_KEY> (base URL https://soundtracks.loudly.com) | — | Trial: free track allowance on signup with the API key from the developer portal; then volume-based pricing (Startup/SME/Corporate) or pay-as-you-go | Base URL: https://soundtracks.loudly.com Free plan: trial ↗ Example call: generate a song from a text prompt: POST https://soundtracks.loudly.com/api/ai/prompt/songs ↗ | Vendor lists an MCP server as 'in development' (not yet released) as of this check. | SourceForge 1.0★/1 review |
| Mubert API | Generate streaming or file-based background music from text/image prompts via REST/WebRTC API, 15s-25min tracks. | API keycustomer-id + access-token headers (credentials emailed after checkout) | — | paid only; plans start at $49/mo (100 generations/mo), no free tier | Base URL: https://music-api.mubert.com/api/v3/public Free plan: none ↗ Async jobs: POST /tracks, then poll GET track by id or use a webhook ↗ | No self-serve free trial; must purchase a plan before receiving API credentials. | — |
| Soundraw API | Generate royalty-free background music tracks by mood, genre, and duration via REST API for embedding in apps. | API keycheck docs (exact header not publicly disclosed on marketing pages) | — | Trial: one-time 2-week free API trial with no commitment; then Starter $29.99/mo for 100 songs with a 6-month minimum commitment | Free plan: 2-week free trial, one-time ↗ Unit price: API Starter $29.99/mo for up to 100 songs (~$0.30 per song); API Pro $300/mo for up to 1,000 songs ↗ | Full technical API reference is gated behind sales/docs portal; only an FAQ page and pricing were publicly confirmed. | SourceForge 1.0★/1 review |
| Stable Audio API (Stability AI) | Generate music and sound effects from text prompts via REST API (Stable Audio 2.5, or Stable Audio 3.0 for tracks up to 6 minutes). | API keyAuthorization: Bearer <STABILITY_API_KEY> | — | shares Stability AI platform credits; 25 free credits on signup, then pay-as-you-go | Base URL: https://api.stability.ai Free plan: 25 free credits for new accounts (Stable Audio 2.5 costs 20 credits per generation), one-time ↗ Rate limits: 150 requests per 10 seconds; exceeding gives 429 and a 60-second timeout ↗ Example call: generate music or sound effects from a text prompt: POST https://api.stability.ai/v2beta/audio/stable-audio-2/text-to-audio ↗ Unit price: Stable Audio 2.5 text-to-audio: 20 credits per successful generation; 1 credit = $0.01 (about $0.20) ↗ | Endpoint POST /v2beta/audio/stable-audio-2/text-to-audio; default model 2.5 costs 20 credits per generation; Stable Audio 3.0 (up to 6 min, async) costs 26 credits. Shares the platform.stability.ai credit system with Stability's image API. | — |
Other categories
- Web search
- Web scraping and browser automation
- Knowledge and research data
- Image generation and editing
- Video generation and editing
- Speech and audio
- 3D generation and assets
- Architecture, CAD and BIM
- Diagrams and software architecture
- Design and UI
- Documents, OCR and presentations
- Translation and language
- Code execution sandboxes
- Developer platforms and DevOps
- Cloud and hosting
- Databases
- Vector search, memory and RAG
- Email, team chat and notifications
- SMS and messaging apps
- Voice agents and telephony
- Productivity and workspace
- CRM, support and marketing
- Social media
- Maps, geolocation and weather
- Finance, payments and market data
- E-commerce
- Automation and integration platforms
- Model APIs and inference