Create royalty-free AI music tracks with one click
Just describe what you want and get an instant track of any duration — and you will never meet any troubles with copyrights
Get startedA beginner’s guide to integrating AI music with Mubert’s API, from setup to streaming, so your creators get safe, unique, and ready-to-use soundtracks.
Why Music is the Missing Ingredient 🎬
Video without music is like a movie without dialogue, technically complete, but emotionally empty.
The right soundtrack infuses every frame with emotion, giving joy more sparkle, suspense more tension, and nostalgia more depth. It shapes the rhythm of each scene, so the story flows effortlessly, and it gives the content its own personality, something viewers remember long after the visuals fade.
For creators, however, adding music is often frustrating:
- They don’t know where to find the right track
- Licensing terms are confusing or restrictive
- They fear copyright strikes on platforms like YouTube, TikTok, or Instagram
For platform owners, this is a chance to make your tool irreplaceable by:
- Giving creators instant access to professional-quality soundtracks
- Handling licensing and copyright safety automatically
- Reducing workflow friction, so creators never have to leave your app
This guide will walk you through how to achieve all of this using Mubert, an AI-powered, royalty-free music generation platform, even if you’ve never integrated music before.
Understanding AI-Generated Music
Before we dive into integration, it’s important to understand what AI music is and how it’s different from traditional music libraries.
Traditional Music Licensing means buying the right to use pre-recorded tracks from a library. While straightforward, it often results in:
- Limited variety, popular tracks get overused.
- Higher licensing costs.
- Confusing restrictions depending on usage.
AI-generated music, on the other hand, is created on demand. It’s unique each time, tailored to a creator’s exact needs, and often comes with simplified licensing. Instead of spending hours browsing hundreds of tracks hoping to find “the one,” creators can instantly have a soundtrack generated specifically for their project, in the right mood, style, and length without worrying about whether someone else has already used it a thousand times. This is where AI doesn’t just save time, it reshapes the creative process, giving every piece of content a soundtrack that feels personal and fresh.
Why Mubert Is the Right Choice
When evaluating music integration options, you need a provider that balances:
- Variety-So creators never feel limited.
- Speed-Previews must load in seconds.
- Legal Safety-Content should be DMCA-safe for all major platforms.
- Scalability-Able to handle thousands of creators at once.
Mubert delivers on all four with API 3.0, blending a vast pre-made library with real-time generative capabilities.

This combination means you can offer creators instant track selection from a rich library or personalized compositions generated on demand, without compromising speed or safety.
Planning Your Integration, Step by Step
This section focuses on designing the experience, because integration is not just a technical process, it’s a user experience decision.
Step 1. Identify When Music Is Added
Ask: At what point in the creator’s workflow will music be introduced?
- End-stage integration: Users add music after editing visuals, good for final polish.
- Live integration: Users add background music during real-time UGC streaming.
- In-progress integration: Users choose music while editing to help guide the tone.
Pro Tip: Start with one scenario and perfect it before expanding.
Step 2. Design the Music Selection Interface
Your music library could be massive, but the interface must be simple for a first-time user:
- Present mood or theme categories first (e.g., “Chill,” “Epic,” “Happy,” “Dramatic”).
- Offer one-click previews so they can hear before they commit.
- Provide basic customization like track length or intensity, avoid overwhelming them with advanced audio terms.
Avoid overwhelming users with deep genre trees or technical audio terms at first.
Step 3. Prioritise Speed and Flow
Creators work in a creative “flow state”. If they click “Add Music” and have to wait 60+ seconds for a preview, you’ve lost that moment. Mubert’s low-latency streaming means previews can start in about 3 seconds, fast enough to keep them engaged. Continuous streaming ensures the track plays smoothly while they edit.
Step 4. Communicate Licensing Clearly
Trust is built when users know exactly what rights they have:
- Display a “Safe to Use” badge next to every track.
- Use simple explanations like: “This music is cleared for YouTube, TikTok, and Instagram under your current plan”.
- If you have free and paid tiers, make licensing differences obvious before users apply a track.
Licensing Explained Simply
Music licensing can be intimidating for non-technical users. Here’s the simple breakdown:
- Commercial License: Allows the music to be used in videos that make money (ads, sponsorships, monetized YouTube channels).
- Sub-Licensing: Gives your creators the right to use music in their own projects without having to buy a separate license.
- Platform-Level Licensing: Covers previews, background music, and in-app playback.
Mubert Advantage: Their API & Enterprise plans include sub-licensing, essential for any UGC platform where users will post externally.
Once integration is live, measure:
- Attach Rate: % of projects that include music
- Preview Speed: Average time from click to first note
- Repeat Use: How often the same user adds music in multiple projects
- Claim-Free Rate: % of exported videos with no copyright claims
- Retention Impact: Are music-using creators staying longer?
Examples of AI Music in Action
- Instories: Offers instant AI-generated soundtracks in video templates, boosting project completion rates.
- Restream: Lets streamers add background music live without copyright worries.
- Online Course Platforms: Add ambient AI music to lesson videos for better engagement without risking copyright flags.
Integrating AI music now sets you up for:
- Adaptive Soundtracks that shift with the video’s mood.
- Voice-to-Music generation from spoken prompts.
- Blockchain Licensing for transparent, automated royalties via Mubert Protocol.
Adding AI music integration transforms your platform from a tool into a complete creative ecosystem. With Mubert, you can give creators:
- Unlimited, unique, and safe-to-use tracks.
- A faster, smoother, and more enjoyable workflow.
- Confidence their content won’t get flagged or removed.
When your creators press play and hear a track that fits perfectly and know they can share it anywhere without fear, you haven’t just solved a problem. You’ve elevated their storytelling.
Ready to Add AI Music to Your Platform?
How to start
After purchasing the API you will receive Company_ID and License_Token. Use these credentials to authorize API.
curl -X POST "https://music-api.mubert.com/api/v3/service/*" \
-H "Content-Type: application/json" \
-H "company-id: COMPANY_ID" \
-H "license-token: LICENSE_TOKEN"
company-id= your unique company identifierlicense-token= key tied to your license- Use this pair for service-level requests (managing customers, licenses, etc.).
A company can have several licenses with different capabilities and limits. By default, you start with one license , in most cases this is enough.
Register a first user
Each end-user of your product gets a unique customer-id and access-token. These are required for track generation or streaming.
To create a customer, call the /customers endpoint:
curl -X POST "https://music-api.mubert.com/api/v3/service/customers" \
-H "Content-Type: application/json" \
-H "company-id: COMPANY_ID" \
-H "license-token: LICENSE_TOKEN" \
-d "{
\"custom_id\": \"YOUR_CUSTOM_ID\"
}"
custom_idis your internal user reference.- The response will include
customer-idandaccess-token. - Store these securely, they’ll be used in public endpoints.
Get a list of playlists (or channels)
Both streaming and track generation require selecting a music channel. Mubert currently has 150+ channels available.
Use the /playlists endpoint:
curl -X GET "https://music-api.mubert.com/api/v3/public/playlists" \
-H "customer-id: CUSTOMER_ID" \
-H "access-token: ACCESS_TOKEN"
This returns categories, groups, channels, and playlist indexes you’ll use later.
How to use new functions
WebRTC Streaming
Stream generative music live with sub-second latency, ideal for real-time UGC or live content.
curl -X GET "https://music-api.mubert.com/api/v3/public/streaming/get-link" \
-H "Content-Type: application/json" \
-H "customer-id: YOUR_CUSTOMER_ID" \
-H "access-token: YOUR_ACCESS_TOKEN" \
-d '{
"playlist_index": "1.0.0",
"bitrate": 320,
"intensity": "medium",
"type": "webrtc"
}'
Parameters:
playlist_index: which channel to usebitrate: audio quality (e.g. 128, 320)intensity: mood leveltype: choosewebrtcfor ultra-low latency
Curated Music Library
Instead of generating tracks, you can instantly access a library of curated, pre-generated tracks.
Step 1. List filter parameters
curl -X GET "https://music-api.mubert.com/api/v3/public/music-library/params" \
-H "customer-id: CUSTOMER_ID" \
-H "access-token: ACCESS_TOKEN"
Example: BPM = 120, Genre = Nu Disco, Duration = 180 seconds.
curl -X GET "https://music-api.mubert.com/api/v3/public/music-library/tracks?bpm=120&genres=Nu%20Disco&duration=180" \
-H "customer-id: CUSTOMER_ID" \
-H "access-token: ACCESS_TOKEN"
Webhooks
Set up webhooks to receive notifications (e.g. when track generation is complete).
curl -L -X PUT "https://music-api.mubert.com/api/v3/service/licenses/LICENSE_ID" \
-H "company-id: COMPANY_ID" \
-H "license-token: LICENSE_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"webhook_url\": \"https://YOUR_WEBHOOK_URL\",
\"webhook_enabled\": true
}"
This ensures your system automatically knows when a track is ready.
Use Cases
UGC apps, creator tools, social media
Let your users generate and remix unique, royalty-free tracks for videos, podcasts, or games, with zero copyright risk.
Useful API methods:
POST /api/v3/public/tracks/→ build full songsPOST /api/v3/public/tracks/→ generate from text promptPOST /api/v3/public/tracks/→ generate from imageGET /api/v3/public/music-library/→ searchable curated library
This guide is a complete beginner’s roadmap for integrating AI-generated music into video editing or UGC tools using Mubert’s API 3.0. It starts with the “why”, showing how music transforms storytelling and how AI solves common pain points like copyright, limited choice, and confusing licensing. It then breaks down step-by-step planning: where music fits in the user workflow, how to design a frictionless interface, and how to communicate licensing simply.
From there, it moves into hands-on integration with clear API instructions:
- Authorizing with
Company_IDandLicense_Token - Registering end-users and managing
customer-id/access-token - Fetching playlists and categories
- Enabling real-time WebRTC streaming
- Accessing the curated music library with filters (BPM, mood, genre)
- Setting up webhooks to track generation status
Finally, it explores use cases across UGC apps, social platforms, streaming, and gaming, with practical API methods for each scenario.
By the end, readers will know exactly how to embed royalty-free, adaptive, copyright-safe music directly into their platforms, giving creators unlimited tracks, faster workflows, and total peace of mind.
AI Music Company
Mubert is a platform powered by music producers that helps creators and brands generate unlimited royalty-free music with the help of AI. Our mission is to empower and protect the creators. Our purpose is to democratize the Creator Economy.
Generate Track API for Developers





