MusicAPI
HomeDocs
HomeDocs
  1. sonic
  • Introduction
  • Credits Usage Guide
  • Music API FAQ & Troubleshooting
  • Special Scenarios
  • Error handling
  • Webhook Integration Guide
  • sonic
    • Sonic Instructions
    • create / extend / cover music
      POST
    • upload and extend music
      POST
    • upload and cover music
      POST
    • create persona
      POST
    • sample
      POST
    • mashup
      POST
    • get BPM
      POST
    • get VOX
      POST
    • get wav
      POST
    • get midi
      POST
    • get lyrics timeline
      POST
    • upsample tags
      POST
    • concat music
      POST
    • stems basic
      POST
    • stems full
      POST
    • upload music
      POST
    • get music
      GET
  • riffusion(Deprecated)
    • Riffusion instructions
    • create music (with lyrics)
      POST
    • create music (with description)
      POST
    • cover music
      POST
    • extend music
      POST
    • replace music section
      POST
    • swap music sound
      POST
    • swap music vocals
      POST
    • upload
      POST
    • get music
      GET
  • producer
    • Producer instructions
    • Complete Request Examples
    • create music
    • upload
    • download
    • get music
  • studio(Unavailable)
    • Studio Instructions
    • description mode (Use case1)
    • extend mode (Use case2)
    • custom mode (Use case3)
    • instrumental mode (Use case4)
    • get music
  • lyrics generation
    • Make Lyrics
  • nuro
    • Nuro Instruction
    • Error handling
    • create vocal music
    • create instrument music
    • get music
  • get-credits
    GET
  • Schemas
    • 记录不存在
    • 参数不正确
HomeDocs
HomeDocs
  1. sonic

mashup

POST
https://api.musicapi.ai/api/v1/sonic/mashup
Mix two existing songs together to create a new song. This endpoint combines elements from two source clips to generate a unique mashup.
Credits cost: 15

How to Use#

1.
Provide two clip IDs in the mashup_clip_ids array
2.
Choose between custom lyrics mode (custom_mode: true) or AI description mode (custom_mode: false)
3.
Select a music model version
4.
Optionally customize style, vocals, and other parameters

Custom Mode vs AI Description Mode#

Custom Mode (custom_mode: true):
You provide the exact lyrics via the prompt parameter
Full control over the lyrical content
Requires prompt field
AI Description Mode (custom_mode: false):
AI generates lyrics based on your description
Provide a description via gpt_description_prompt
AI creates appropriate lyrics matching your description
Requires gpt_description_prompt field

Model Compatibility#

Both sonic-* and chirp-* naming formats are supported:
sonic-v3-5 / chirp-v3-5
sonic-v4 / chirp-v4
sonic-v4-5 / chirp-v4-5
sonic-v4-5-plus / chirp-v4-5-plus
sonic-v5 / chirp-v5

Polling Result#

Use the task query endpoint with the returned task_id to poll for results. Recommended polling interval: 15-25 seconds.

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Body Params application/json

Examples
{
    "mashup_clip_ids": [
        "abc123-def456",
        "xyz789-ghi012"
    ],
    "custom_mode": true,
    "mv": "chirp-v4-5-plus",
    "prompt": "[Verse 1]\nMixing beats together\nCreating something new\n\n[Chorus]\nThis is our mashup\nBlending old and new",
    "title": "Epic Mashup",
    "tags": "electronic, dance, energetic",
    "style_weight": 0.7
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST 'https://api.musicapi.ai/api/v1/sonic/mashup' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "mashup_clip_ids": [
        "abc123-def456",
        "xyz789-ghi012"
    ],
    "custom_mode": true,
    "mv": "chirp-v4-5-plus",
    "prompt": "[Verse 1]\nMixing beats together\nCreating something new\n\n[Chorus]\nThis is our mashup\nBlending old and new",
    "title": "Epic Mashup",
    "tags": "electronic, dance, energetic",
    "style_weight": 0.7
}'

Responses

🟢200成功
application/json
success
Body

Example
{
    "code": 200,
    "message": "success",
    "task_id": "81ed9f60-56ae-48c1-9c46-33a8220dfca7"
}
Modified at 2026-01-31 14:01:19
Previous
sample
Next
get BPM
Built with