---
title: ToolRouter — Tool Detail
description: Detailed documentation for a ToolRouter tool including skills, parameters, and examples.
url: https://toolrouter.com/tools/music-generator
---
# Music Generator

Generate original music from a text description — specify genre, mood, instruments, tempo, and style. Perfect for content creators, game developers, and anyone needing background music. Tracks from 3 seconds to 10 minutes in MP3 or PCM, with instrumental-only mode and reproducible seeds.

- **Version:** 0.02
- **Categories:** media, ai

## Skills (1)

### Generate Music (`generate_music`)

Generate an original music track from a text description using AI. Describe the genre, mood, instruments, tempo, and style to shape the output. Returns a downloadable audio file.

**Parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `prompt` | string | Yes | Text description of the music. Specify genre, mood, instruments, tempo (e.g. "upbeat lo-fi hip hop with jazzy piano and vinyl crackle, 85 BPM"). |
| `duration_seconds` | number | No | Duration of the generated track in seconds (3-600). Defaults to 30. [default: 30] |
| `force_instrumental` | boolean | No | Guarantee instrumental-only output with no vocals or singing. Defaults to false. [default: false] |
| `seed` | number | No | Random seed for reproducible results. Same seed and prompt will produce similar output. |
| `output_format` | string | No | Audio output format (e.g. "mp3_44100_128", "pcm_44100"). Defaults to "mp3_44100_128". [default: "mp3_44100_128"] |

**Returns:** Audio file path (auto-uploaded as a downloadable asset), prompt used, duration, format, seed, and file size

**Examples:**

*Generate a lo-fi hip hop beat:*

```json
{
  "prompt": "Chill lo-fi hip hop beat with jazzy piano chords, warm vinyl crackle, and a slow relaxing groove at 80 BPM",
  "duration_seconds": 60,
  "force_instrumental": true
}
```

*Generate a short cinematic intro with a specific seed:*

```json
{
  "prompt": "Epic orchestral cinematic intro with dramatic strings, brass fanfare, and thundering timpani — dark and heroic mood",
  "duration_seconds": 15,
  "seed": 42
}
```

## Quick Start

```bash
# Via CLI
TOOLROUTER_API_KEY=tr_live_xxx npx -y toolrouter-mcp call music-generator generate_music --prompt Chill lo-fi hip hop beat with jazzy piano chords, warm vinyl crackle, and a slow relaxing groove at 80 BPM --duration_seconds 60 --force_instrumental true

# Via REST API
curl -H "Authorization: Bearer tr_live_xxx" \
     -d '{"tool":"music-generator","skill":"generate_music","input":{"prompt":"Chill lo-fi hip hop beat with jazzy piano chords, warm vinyl crackle, and a slow relaxing groove at 80 BPM","duration_seconds":60,"force_instrumental":true}}' \
     https://api.toolrouter.com/v1/tools/call
```

## Frequently Asked Questions

### What should I include in the music prompt?

Be specific about genre, mood, instruments, tempo, and style. BPM helps when you want exact timing.

### Can I generate instrumental-only music?

Yes. Set `force_instrumental: true` if you want to avoid vocals.

### Can I make the result reproducible?

Yes. Set a seed when you want the same prompt to produce a consistent result again.

### How long can a track be?

Tracks can run from 3 seconds to 10 minutes, with MP3 or PCM output depending on your use case.

---

## Get Started with ToolRouter

**Already connected?** Call any tool with `use_tool({ tool, skill, input })`. Browse tools with `discover` or visit https://toolrouter.com/llms-full.txt

**New to ToolRouter?** Connect with one command (no API key needed — auto-provisions on first use):

```bash
# MCP (Claude Code, Codex CLI)
claude mcp add toolrouter -- npx -y toolrouter-mcp

# MCP (Cursor, Windsurf, Cline, VS Code, Gemini CLI, Claude Desktop)
{"mcpServers":{"toolrouter":{"command":"npx","args":["-y","toolrouter-mcp"]}}}

# Claude Chat / Claude Cowork / Claude Mobile — add as a connector:
# Settings → Connectors → Add custom connector → URL: https://api.toolrouter.com/mcp

# ChatGPT — add as an app:
# Settings → Apps → Advanced settings → enable Developer mode → Create app → MCP Server URL: https://api.toolrouter.com/mcp

# CLI (works instantly, no restart needed)
npx -y toolrouter-mcp tools                    # browse all tools
npx -y toolrouter-mcp search "seo"             # search by keyword
npx -y toolrouter-mcp call seo analyze_page --url https://example.com
```

Free tools work immediately. For paid tools, visit https://toolrouter.com/claim to add credits.

All platforms: https://toolrouter.com/connect | Full catalog: https://toolrouter.com/llms-full.txt | Docs: https://toolrouter.com/docs