Introduction#
Welcome to MusicAPI - the unified API platform for AI music generation. Create professional-quality music with simple API calls.
What is MusicAPI?#
MusicAPI provides a single, unified interface to access multiple AI music generation models. Whether you need vocal songs, instrumental tracks, or audio processing tools, MusicAPI has you covered.Key Benefits#
| Feature | Description |
|---|
| Multiple Models | Access Sonic, Producer, and Nuro models through one API |
| No Watermarks | All generated audio is watermark-free and ready for commercial use |
| Full Features | Create, extend, cover, remix, stem separation, and more |
| Multilingual | Generate songs in multiple languages |
| Simple Integration | RESTful API with straightforward authentication |
Sonic Model Versions#
| Version | Description |
|---|
sonic-v3-5 | Legacy model |
sonic-v4 | Improved audio quality |
sonic-v4-5 | Enhanced vocals, supports vocal gender control |
sonic-v4-5-plus | Premium quality |
sonic-v5 | Latest model with best quality |
Quick Start#
1. Get Your API Key#
3.
Go to Dashboard → API Keys
2. Make Your First Request#
3. Poll for Results#
Poll every 15-25 seconds until state is succeeded.
Generation Modes#
Custom Mode (custom_mode: true)#
Full control over your music:Write your own lyrics with structure tags ([Verse], [Chorus], etc.)
Set title and other parameters
{
"custom_mode": true,
"mv": "sonic-v4-5",
"title": "My Song",
"tags": "pop, rock",
"prompt": "[Verse]\nYour lyrics here..."
}
AI Description Mode (custom_mode: false)#
Let AI handle the creativity:Describe what you want in natural language
AI generates lyrics and composition
{
"custom_mode": false,
"mv": "sonic-v4-5",
"title": "Summer Vibes",
"tags": "pop, summer",
"gpt_description_prompt": "An upbeat summer song about beach parties and good times"
}
Credits System#
MusicAPI uses a credit-based system. Each operation costs a specific number of credits:| Operation | Credits |
|---|
| Create music | 15 |
| Extend music | 15 |
| Cover music | 15 |
| Concat music | 2 |
| Upload + Extend | 15 |
| Upload + Cover | 15 |
| Create persona | 1 |
| Get BPM | 1 |
| Get VOX | 1 |
| Upsample tags | 1 |
| Stems (basic) | 15 |
| Stems (full) | 75 |
Check your remaining credits:
Authentication#
All API requests require Bearer token authentication.Important Notes#
HTTPS Required: All requests must use HTTPS. HTTP requests will fail.
Keep Secret: Never expose your API key in client-side code or public repositories.
One Key Per Project: We recommend using separate API keys for different projects.
Rate Limits#
| Plan | Rate Limit |
|---|
| Standard | 1 request per 3 seconds |
| Custom/Enterprise | Higher concurrency available |
If you need higher rate limits, contact us for custom plans.
Core Endpoints#
Sonic API#
| Endpoint | Method | Description |
|---|
/api/v1/sonic/create | POST | Create, extend, cover, or concat music |
/api/v1/sonic/task/{task_id} | GET | Poll task results |
/api/v1/sonic/upload | POST | Upload audio file |
/api/v1/sonic/upload-extend | POST | Upload and extend in one request |
/api/v1/sonic/upload-cover | POST | Upload and cover in one request |
/api/v1/sonic/persona | POST | Create virtual singer |
/api/v1/sonic/lyrics | POST | Generate lyrics |
/api/v1/sonic/bpm | POST | Get BPM information |
/api/v1/sonic/vox | POST | Extract vocals |
/api/v1/sonic/upsample-tags | POST | Enhance style tags |
/api/v1/sonic/stems/basic | POST | Basic stem separation |
/api/v1/sonic/stems/full | POST | Full stem separation |
/api/v1/sonic/wav | POST | Get WAV format |
/api/v1/sonic/midi | POST | Get MIDI data |
/api/v1/sonic/aligned-lyrics | POST | Get lyrics timeline |
Other Models#
| Model | Create Endpoint | Task Endpoint |
|---|
| Producer | /api/v1/producer/create | /api/v1/producer/task/{task_id} |
| Nuro | /api/v1/nuro/create | /api/v1/nuro/task/{task_id} |
All successful responses follow this format:{
"code": 200,
"message": "success",
"task_id": "uuid-string",
"data": { ... }
}
Task States#
| State | Description |
|---|
pending | Task is queued |
running | Task is processing |
succeeded | Task completed successfully |
failed | Task failed |
Error Handling#
| HTTP Code | Type | Description |
|---|
| 400 | validation_error | Invalid parameters |
| 401 | unauthorized | Invalid or missing API key |
| 403 | forbidden | Insufficient credits |
| 404 | not_found | Resource not found |
| 429 | rate_limit | Too many requests |
| 500 | server_error | Internal server error |
{
"type": "validation_error",
"error": "The 'mv' field is invalid. The model should be 'sonic-v3-5', 'sonic-v4', 'sonic-v4-5', 'sonic-v4-5-plus', or 'sonic-v5'."
}
Webhooks#
Instead of polling, receive notifications when tasks complete:{
"webhook_url": "https://your-server.com/webhook",
"webhook_secret": "your-secret-for-verification"
}
SDKs & Libraries#
Official and community SDKs:| Language | Repository |
|---|
| Python | Coming soon |
| Node.js | Coming soon |
| Go | Coming soon |
Support#
Next Steps#
Modified at 2026-01-24 13:28:07