AudioPod AI
  • Pricing

Loading blog...

AudioPod AI
  • Pricing

Loading article...

AudioPod AI
  • Pricing
AudioPod AI
  • Pricing

Loading article...

Make something worth hearing.

Start creating free

Create

  • Music
  • Text to speech
  • Audiobooks
  • Podcasts
  • Voice changer
  • Audio reader
  • Narration

Edit & convert

  • Stem splitter
  • Separate speakers
  • Noise reduction
  • Speech to text
  • Media converter
  • Browser DAW
  • All features

Developers

  • Developer hub
  • API reference
  • Quickstart
  • Python SDK
  • MCP server
  • Changelog
  • API status

Resources

  • Guides
  • Languages
  • Use cases
  • Alternatives
  • Tool comparisons
  • AI audio guide
  • Glossary
  • Showcase

Free tools

  • Audio Format Converter
  • Video to Audio Extractor
  • Voice Recorder
  • Free Stem Splitter
  • Free Vocal Remover
  • All free tools

Company

  • About
  • Manifesto
  • Careers
  • Blog
  • Customers
  • Affiliate program
  • Contact
All pages · Sitemap

Studio

  • AI Music & Rap
  • Text to Speech
  • Audiobook Studio
  • Podcast Generator
  • Voice Changer
  • Audio Reader
  • AI Narrator
  • Studio overview
  • All features

Edit & process

  • Stem Splitter
  • Speaker Separation
  • Noise Reduction
  • Speech to Text
  • Media Converter
  • Browser DAW
  • YouTube to Podcast

Voices

  • Voice library
  • Languages
  • Iconic voices
  • Showcase
  • Music Radio

Free tools

  • All free tools
  • Audio Format Converter
  • Video to Audio
  • Audio Trimmer
  • Voice Recorder
  • ACX Checker
  • Free Stem Splitter
  • WAV to MP3 Converter
  • MP4 to MP3 Converter

Solutions

  • Audiobook authors
  • Podcasters
  • Musicians & creators
  • Education
  • Voice agents
  • Gaming
  • Accessibility
  • Advertising
  • All use cases
  • Authors program
  • Enterprise

Compare

  • vs ElevenLabs
  • vs Suno
  • vs Descript
  • vs Murf
  • vs NotebookLM
  • vs LALAL.AI
  • vs NarrationBox
  • All alternatives
  • Tool comparisons

Resources

  • Blog
  • Guides
  • Music Studio guides
  • Audiobook guides
  • Speaker Separation guides
  • Stem Splitter guides
  • Voice Studio guides
  • Noise Reduction guides
  • Transcription guides
  • Voice Changer guides
  • Changelog
  • Launches
  • Customers
  • Glossary
  • AI Audio guide
  • Family voice (mobile)
  • AudioPod mobile
  • Affiliate program
  • Pricing
  • Developers
  • For AI agents
  • AudioPod for Startups

Company & legal

  • About
  • Manifesto
  • Careers
  • Press & media
  • Contact
  • Responsible AI
  • Voice consent
  • Trust & security
  • System status
  • Security disclosures
  • Security policy
  • Privacy
  • Cookie policy
  • Terms
AudioPod AI

© 2026 AudioPod AI, Inc. All rights reserved.

Privacy|Terms|Trust Center|Responsible AI|Voice consent
Abstract sound wave visualization in indigo and cyan on dark background representing music generation API
HomeBlogTutorials

AudioPod Music Generation API: Add Soundtracks to Any AI App

Generate royalty-free background music programmatically from a text description. AudioPod's Music Generation API works via REST, Python SDK, or MCP tool call.

AudioPod Team
•Tutorials•May 29, 2026•8 min read

🎧 Listen to this article

On This Page

0%
  • What Problem Does the Music Generation API Solve?
  • Who Is It For?
  • How to Use the Music Generation API
  • Option 1 — REST (any language)
  • Option 2 — Python SDK
  • Option 3 — MCP Tool Call
  • How Does the AudioPod Music API Compare to Stock Music Libraries?
  • What Does It Cost?
  • Frequently Asked Questions
  • Getting Started in 5 Minutes

Most developers who need background music for an AI app face the same fork: license a stock library, ask a designer to source tracks manually, or accept silence. There's a fourth path — generating the music at request time, from a text description, without downloading anything or clearing rights. That's what AudioPod's Music Generation API does, and this post is a practical guide to wiring it into your workflow.

TL;DR — what you get:

  1. REST endpoint — POST /api/v1/music/generate accepts a text caption and returns a download URL when the job completes.
  2. MCP tool call — generate_music(caption, duration_seconds) available in any MCP-compatible agent host (Claude Desktop, Cursor, Cline).
  3. Python SDK — audiopod.music.generate(caption) wraps polling automatically.
  4. Output — WAV or MP3, 15 s–4 min, royalty-free, suitable for commercial use across all plans.
  5. Cost — starts at the Free tier (1,000 credits/month). Generator credits scale by duration; see /pricing for exact tables.

What Problem Does the Music Generation API Solve?

Background music is solved for human creators — stock libraries like Artlist and Epidemic Sound work well when a person is picking tracks. They break down in agent-driven workflows: you can't have an AI app pause and wait for a human to browse a catalog.

The alternative — calling a music-generation model yourself — means deploying GPU infrastructure, managing model weights, handling audio format normalization, and building a polling layer around generation jobs that can take 15–60 seconds. That's a significant platform investment for what is ultimately a supporting feature.

The AudioPod Music Generation API abstracts all of that. Your app sends a text caption describing the mood, tempo, and style you want. AudioPod queues the job, runs generation on its own infrastructure, and gives you a URL. Your app polls for completion (or uses a webhook) and plays or stores the result.


Who Is It For?

The API is a fit for three kinds of builders:

AI agent developers who need to give their agent a voice beyond text. A study-assistant agent that reads passages aloud is better with ambient background music during audio segments. A bedtime-story agent works better with soft accompaniment that fades as narration ends. These are use cases where the music is a UX layer, not a creative output.

Automated video pipelines — teams generating AI explainer videos, social shorts, or product demos at scale. When you're producing hundreds of clips per day, sourcing music manually is a bottleneck. Generating it per-clip, with a caption tuned to the script's tone, keeps the pipeline unattended.

Product developers adding ambient audio to apps — meditation timers, focus modes, interactive fiction, games. Rather than shipping a fixed audio bundle, these apps can generate new soundscapes on demand, matching context (current task, time of day, user preference) at runtime.


How to Use the Music Generation API

Option 1 — REST (any language)

All plan tiers have REST access. You'll need an API key from your dashboard.

📄http code-highlight
12345678910
POST https://api.audiopod.ai/api/v1/music/generate
Authorization: Bearer 
Content-Type: application/json

{
  "caption": "Upbeat lo-fi hip-hop, 80 BPM, soft piano and vinyl crackle, good for focused work",
  "duration_seconds": 60,
  "format": "mp3"
}

Response:

📄json code-highlight
123456
{
  "job_id": "mj_9f2a41bc",
  "status": "queued",
  "poll_url": "https://api.audiopod.ai/api/v1/music/mj_9f2a41bc"
}

Poll poll_url until status is completed. Completed jobs include output_url — a time-limited signed URL for the audio file.

Generation typically completes in 20–40 seconds for a 60-second clip. Longer tracks (up to 4 minutes) take proportionally longer. Implement a simple back-off loop: poll every 5 seconds for the first minute, then every 10 seconds.

Option 2 — Python SDK

Install:

📄bash code-highlight
12
pip install audiopod

Generate and wait in two lines:

📄python code-highlight
123456789
import audiopod

client = audiopod.Client(api_key="ap_...")
result = client.music.generate(
    caption="Cinematic orchestral build, slow tempo, minor key, tension rising",
    duration_seconds=90,
)
print(result.output_url)  # ready when this line runs

The SDK handles polling internally. result.output_url is available as soon as the job completes; the call blocks until then.

Option 3 — MCP Tool Call

If your agent host supports MCP (Claude Desktop, Cursor, Continue, Cline, Goose), add AudioPod's MCP server and call generate_music as a tool:

📄json code-highlight
12345678
{
  "tool": "generate_music",
  "arguments": {
    "caption": "Soft ambient electronic, evolving pads, no drums, calm and contemplative",
    "duration_seconds": 120
  }
}

The agent receives the completed audio URL in the tool result, then passes it downstream — to a video assembler, a TTS narrator, a file-write step — without leaving the agent loop. Full setup instructions are on the /for-agents page.


How Does the AudioPod Music API Compare to Stock Music Libraries?

DimensionStock library (Artlist, Epidemic Sound)Build-your-own modelAudioPod Music API
Setup timeAccount + searchWeeks (infra + training)Minutes (API key)
Fits automated pipelines?No — browsing is manualYesYes
Content customisationBrowse / filter onlyFull controlText caption → on-demand generation
Rights clearanceLicense per trackYour outputRoyalty-free on all plans
Infrastructure costLicense fee (~$200–500/yr)GPU budgetCredit-based; Free tier available
Variable cost at scaleFixed regardless of volumeGPU $/hrCredits per generation (see /pricing)
MCP / agent-native?NoNoYes — generate_music tool

Stock libraries are the right choice when a human is doing the editing and wants catalog depth. The API is the right choice when the pipeline runs unattended and the music needs to match generated context it hasn't seen before.


What Does It Cost?

Music generation uses AudioPod credits. Costs scale by track duration. The Free (Basic) tier includes 1,000 credits per month — enough to generate several short clips without a credit card.

For production workloads:

  • Creator ($20/month) — 200,000 credits/month. Suitable for up to ~200 one-minute tracks per month.
  • Pro ($50/month) — 600,000 credits/month. For teams generating audio at scale alongside other tools (TTS, stem separation).
  • Studio ($100/month) — 1,250,000 credits/month. Dedicated support channel included.

Pay-as-you-go is also available: $1 = 7,500 credits, no expiry. If your usage is occasional rather than daily, top-up credits are often the cheapest option.


Frequently Asked Questions

Can I use generated music in commercial projects? Yes. Music generated via the API is royalty-free and licensed for commercial use on all paid plans. The Free tier also permits commercial use within its monthly credit limit.

What audio formats does the API return? MP3 and WAV. Specify "format": "mp3" or "format": "wav" in the request body. MP3 is the default when format is omitted.

How long does generation take? Typically 20–40 seconds for a 60-second track on standard generation. Longer tracks scale roughly linearly. There is no real-time streaming — the full clip is delivered as a single file when complete.

Is there a maximum track duration? The current maximum is 4 minutes (240 seconds) per API call. For longer pieces, generate multiple segments and concatenate. The stem separation feature can help if you later need to isolate or recombine elements.

What caption style gets the best results? The engine responds well to captions that specify tempo (BPM or a relative term like "slow", "medium", "driving"), instrumentation ("solo piano", "strings and brass", "lo-fi drums"), and mood ("tense", "hopeful", "introspective"). Vague captions like "nice music" produce inconsistent results.

Does the API support webhooks instead of polling? Webhook delivery to a URL you specify is available on Pro and Studio tiers. Set "webhook_url": "https://your-app.com/hooks/music" in the request body; AudioPod will POST the completed job payload when it finishes.

How long are output URLs valid? Download URLs are signed and expire after 24 hours. If your pipeline needs to reference the file later, download it to your own storage within that window. AudioPod's own storage retention matches your plan tier — Creator keeps outputs for 2 years, Pro for 3 years, Studio for 5 years.


Getting Started in 5 Minutes

  1. Create a free account at audiopod.ai — no credit card required.
  2. Generate your API key in Settings → API Keys.
  3. Install the SDK (pip install audiopod or npm install @audiopod/sdk) or construct the REST request directly.
  4. Send a test caption — a 15-second clip uses minimal credits and confirms end-to-end connectivity.
  5. Add the MCP server (mcp.audiopod.ai) to your agent host configuration to enable tool-call access from Claude Desktop, Cursor, or any MCP-compatible environment. Full setup at /for-agents.

If you're adding music to a larger agent pipeline that also uses text-to-speech or speech-to-text, all three services share the same API key and the same credit pool — no separate accounts.


Background music in agent-driven workflows has been an unsolved rough edge for most teams because the manual solutions simply don't fit automated pipelines. If you're building anything that generates audio, video, or interactive experiences at scale, a one-call music API is worth adding to the stack.

Tags

#api#music-generation#developer-tools#ai-music#mcp

Share this article

On This Page

0%
  • What Problem Does the Music Generation API Solve?
  • Who Is It For?
  • How to Use the Music Generation API
  • Option 1 — REST (any language)
  • Option 2 — Python SDK
  • Option 3 — MCP Tool Call
  • How Does the AudioPod Music API Compare to Stock Music Libraries?
  • What Does It Cost?
  • Frequently Asked Questions
  • Getting Started in 5 Minutes

Related Articles

How to Make an Audiobook Retail Sample That Sells
Tutorials
August 4, 202611 min read

How to Make an Audiobook Retail Sample That Sells

The retail sample gets more plays than the rest of your audiobook combined. A step-by-step workflow for building one that converts browsers into buyers.

Read article
How to Fix AI Narration Pronunciation for Fantasy Audiobooks
Tutorials
July 28, 202611 min read

How to Fix AI Narration Pronunciation for Fantasy Audiobooks

A step-by-step workflow for making an AI narrator say your invented names correctly — respellings, test renders, and a transcript diff to catch misses.

Read article
ACX Audio Specs: Master an AI Audiobook That Passes QA
Tutorials
July 14, 20268 min read

ACX Audio Specs: Master an AI Audiobook That Passes QA

A step-by-step guide to mastering AI-narrated audiobook files to ACX's audio specs so your submission clears QA on the first pass.

Read article

Try AudioPod free

Turn this into your own audio — start free, no card required.

Get started freeSee pricing

Get free audio tips and early access

The best of AudioPod in your inbox — no spam, unsubscribe anytime.

Weekly audio tips · Feature previews · Exclusive discounts