MusicGen

Popular
Meta
Audio & Music

Meta's music generation model. Generate up to 1 minute of music from text descriptions.

Try MusicGen
Sign in to generate — 50 free credits on sign-up

Examples

See what MusicGen can generate

Lo-Fi Chill

0:30

0:30

Try it in the playground above

Lo-fi hip hop beat with warm vinyl crackle, mellow jazz piano chords, soft brushed drums, and a gentle bass line, perfect for studying and relaxation, 85 BPM

Epic Orchestral

0:20

0:20

Try it in the playground above

Cinematic orchestral piece building from a solo cello melody to a full symphonic crescendo with timpani, brass fanfare, and soaring strings, dramatic and emotional, suitable for a movie trailer

Pricing

Price per Generation
Per generation€1.50

API Integration

Use our OpenAI-compatible API to integrate MusicGen into your application.

Install
npm install railwail
JavaScript / TypeScript
import railwail from "railwail";

const rw = railwail("YOUR_API_KEY");

// Simple — just pass a string
const reply = await rw.run("musicgen", "Hello! What can you do?");
console.log(reply);

// With message history
const reply2 = await rw.run("musicgen", [
  { role: "system", content: "You are a helpful assistant." },
  { role: "user", content: "Explain quantum computing simply." },
]);
console.log(reply2);

// Full response with usage info
const res = await rw.chat("musicgen", [
  { role: "user", content: "Hello!" },
], { temperature: 0.7, max_tokens: 500 });
console.log(res.choices[0].message.content);
console.log(res.usage);
Specifications
Price
€1.50
Avg. latency
30.0s
Est. duration
30s
Developer
Meta
Category
Audio & Music
Supported Formats
mp3
wav
Tags
music
popular

Start using MusicGen today

Get started with free credits. No credit card required. Access MusicGen and 100+ other models through a single API.