Loading playground
Input
Additional Settings
Customize your input with more control.
Result
Idle
Customize your input with more control.
Customize your input with more control.
Hint: Drag and drop audio files from your computer, audio from web pages, paste from clipboard (Ctrl/Cmd+V), or provide a URL. Accepted file types: mp3, ogg, wav, m4a, aac
Customize your input with more control.
Your request will cost $0.035 per generation.
Your request will cost $0.035 per generation.
Transform your creative ideas into original music with MiniMax Music, a powerful AI music generation API that helps developers and creators produce high-quality, customizable musical compositions.
MiniMax Music enables seamless integration of AI-powered music generation into your applications. Whether you're building a creative tool, game soundtrack system, or content creation platform, our API provides the flexibility and control you need.
Getting started with MiniMax Music takes just a few minutes. Here's how:
For JavaScript/TypeScript:
bashnpm install --save @fal-ai/client
For Python:
bashpip install fal-client
javascriptimport { fal } from "@fal-ai/client"; fal.config({ credentials: "YOUR_FAL_KEY_HERE" });
javascriptconst result = await fal.subscribe("fal-ai/minimax-music", { input: { prompt: "Upbeat electronic dance track with strong bass line" } });
Our API supports two primary integration patterns:
Perfect for real-time applications where immediate results are needed:
javascriptconst generateMusic = async (prompt) => { try { const result = await fal.subscribe("fal-ai/minimax-music", { input: { prompt }, logs: true, onQueueUpdate: (update) => { if (update.status === "IN_PROGRESS") { update.logs.map((log) => log.message).forEach(console.log); } } }); return result.audio; } catch (error) { console.error("Music generation failed:", error); } }
Ideal for generating multiple compositions or handling larger requests:
javascript// Submit a request const { request_id } = await fal.queue.submit("fal-ai/minimax-music", { input: { prompt: "## Fast and Limitless\nIn the heart of the code, where dreams collide,\nFAL's the name, taking tech for a ride.\nGenerative media, blazing the trail,\nFast inference power, we'll never fail.\n##" }, webhookUrl: "https://optional.webhook.url/for/results" }); // Check status const status = await fal.queue.status("fal-ai/minimax-music", { requestId: request_id, logs: true }); // Get result const result = await fal.queue.result("fal-ai/minimax-music", { requestId: request_id });
Use reference tracks to guide the style of your generated music:
javascriptconst result = await fal.subscribe("fal-ai/minimax-music", { input: { prompt: "Your lyrical content here", reference_audio_url: "https://your-audio-url.mp3" } });
Reference tracks should be:
.wav or .mp3 formatUpload local files to use as reference audio:
javascriptimport { fal } from "@fal-ai/client"; const file = new File([audioData], "reference.mp3", { type: "audio/mp3" }); const url = await fal.storage.upload(file); const result = await fal.subscribe("fal-ai/minimax-music", { input: { prompt: "Your prompt", reference_audio_url: url } });
For optimal results with MiniMax Music:
## markers to wrap lyrics in your prompts for better formattingThe API accepts the following input parameters:
typescript{ prompt: string; // Your text prompt with lyrics and style description reference_audio_url?: string; // Optional reference track URL }
The API returns:
typescript{ audio: { url: string; // URL of the generated audio file content_type: string; // MIME type of the audio file_name: string; // Auto-generated filename file_size: number; // Size in bytes } }
.mp3, .wav, .ogg, .m4a, .aacOur transparent, usage-based pricing scales with your needs. No subscription necessary.
View detailed pricing or contact sales for enterprise solutions.
Set your API key as an environment variable:
bashexport FAL_KEY="your-api-key-here"
Or configure it programmatically:
javascriptimport { fal } from "@fal-ai/client"; fal.config({ credentials: "your-api-key-here" });
⚠️ Security Note: Never expose your API key in client-side code. Use environment variables or server-side proxy for production applications.
We're here to help you succeed:
The MiniMax Music API provides the tools you need to integrate AI-powered music generation into your applications. Get started today and transform your creative ideas into reality.
Ready to begin? Sign up for an API key and start generating music in minutes.