docs.api.box
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
Support
Suno API
Common APIFile Upload API
Suno API
Common APIFile Upload API
  1. Generate Music
  • API.box Documentation
  • Quick Start
  • Generate Music
    • Music Generation Callbacks
    • Music Extension Callbacks
    • Upload and Cover Audio Callbacks
    • Upload and Extend Audio Callbacks
    • Add Instrumental Callbacks
    • Add Vocals Callbacks
    • Music Cover Generation Callbacks
    • Replace Music Section Callbacks
    • Generate Music
      POST
    • Extend Music
      POST
    • Upload And Cover Audio
      POST
    • Upload And Extend Audio
      POST
    • Add Instrumental
      POST
    • Add Vocals
      POST
    • Get Music Generation Details
      GET
    • Recovery Audio
      POST
    • Get Recovery Audio Details
      GET
    • Get Timestamped Lyrics
      POST
    • Boost Music Style
      POST
    • Generate Music Cover
      POST
    • Replace Music Section
      POST
    • Get Music Cover Details
      GET
    • Generate Persona
      POST
    • Generate Mashup
      POST
  • Suno Voice
    • Suno Voice Validation Phrase Callbacks
    • Suno Voice Generation Callbacks
    • Suno Voice Regenerate Phrase Callbacks
    • Suno Voice Generate Verification Phrase
      POST
    • Suno Voice Get Verification Phrase
      GET
    • Suno Voice Create Custom Voice
      POST
    • Suno Voice Get Custom Voice Record
      GET
    • Suno Voice Regenerate Verification Phrase
      POST
    • Suno Voice Check Availability
      POST
  • Lyrics Generation
    • Lyrics Generation Callbacks
    • Generate Lyrics
    • Get Lyrics Generation Details
  • Generate Sounds
    • Generate Sounds
  • WAV Conversion
    • WAV Format Conversion Callbacks
    • Convert to WAV Format
    • Get WAV Conversion Details
  • Vocal Removal
    • Audio Separation Callbacks
    • MIDI Generation Callbacks
    • Vocal and Instrument Separation
    • Get Audio Separation Details
    • Generate MIDI from Audio
    • Get MIDI Generation Details
  • Music Video Generation
    • Music Video Generation Callbacks
    • Create Music Video
    • Get Music Video Details
  • Generate Speech
    • Generate Speech
  1. Generate Music

Generate Mashup

POST
/api/v1/generate/mashup
Mix two audio files to generate a new mashup work using AI models.

Model Versions#

Current models: V6 (default), V6_WILD, V6_MINI
Deprecated models: V5_5, V5, V4_5PLUS, V4_5ALL, V4_5, V4
Deprecated values remain available only for backward compatibility. New integrations should use a V6-series model.

Usage Guide#

This endpoint always uses custom parameters. Simple mode is not available.
This endpoint creates mashup music from 2 uploaded audio files
Combines elements from multiple tracks into a cohesive new composition

Parameter Details#

uploadUrlList is required and must contain exactly 2 audio file URLs; only the first 2 are used
model (string, required): V6, V6_WILD, V6_MINI. Deprecated: V4, V4_5, V4_5PLUS, V4_5ALL, V5, V5_5.
style and title are required
prompt is optional and is treated as lyrics. When lyrics is also provided, lyrics takes priority and prompt is not used as lyrics
lyrics is optional. It takes priority over prompt as the lyrics. If lyrics is omitted, prompt is used as the lyrics
Character limits (based on model):
V4, V4_5, V4_5PLUS, V4_5ALL, V5 & V5_5 (Deprecated): prompt 3000–5000 characters and style 200–1000 characters according to the legacy model.
V6, V6_WILD & V6_MINI: prompt and lyrics max 5000 characters, style max 1000 characters
title length limit: 80 characters (all models)

Optional parameters#

The following fields are optional controls available for this endpoint:
lyrics (string): Lyrics for the mashup. Takes priority over prompt. If omitted, prompt is used as the lyrics. For V6, V6_WILD, and V6_MINI: maximum 5000 characters.
vocalGender (string): Preferred vocal gender. Allowed values: m (male), f (female)
styleWeight (number): Style adherence weight in range 0–1 (recommended two decimals)
weirdnessConstraint (number): Creativity/novelty constraint in range 0–1 (recommended two decimals)
audioWeight (number): Relative weight of audio consistency in range 0–1 (recommended two decimals)
duration (number): Duration in seconds, range 10–360. Only effective with V5_5 (Deprecated), V6, V6_WILD, or V6_MINI.
variety (integer): Diversity of generated results. Integer from 0–4, default 1. 0 off, 1 normal (default), 2 high, 3 extra, 4 max.
personaId (string): Persona ID or Suno Voice voiceId to apply to the generated music. If you use a Voice-generated ID, set personaModel to voice_persona.
personaModel (string): Persona type, default style_persona. Use style_persona for Generate Persona IDs, or voice_persona for Suno Voice IDs.
Request Example
JSON body
{
  "uploadUrlList": [
    "https://example.com/audio1.mp3",
    "https://example.com/audio2.mp3"
  ],
  "lyrics": "[Chorus] Brighter lights, we keep going on",
  "prompt": "[Verse] City hums under neon rain",
  "style": "Electronic Dance Music",
  "title": "Mashup Work",
  "model": "V6",
  "callBackUrl": "https://example.com/callback",
  "vocalGender": "m",
  "styleWeight": 0.65,
  "weirdnessConstraint": 0.72,
  "audioWeight": 0.65,
  "variety": 1
}

Developer Notes#

This endpoint always uses custom parameters; style and title must be provided along with the two source audio URLs
Generated files are retained for 14 days
Callback process has three stages: text (text generation), first (first track complete), complete (all tracks complete)
The two audio files in uploadUrlList must be valid and accessible URLs
Audio files should be in supported formats (MP3, WAV, etc.)

Callbacks

audioGenerated

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Request successful
Bodyapplication/json

🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://apibox.erweima.ai/api/v1/generate/mashup' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "uploadUrlList": [
        "https://example.com/audio1.mp3",
        "https://example.com/audio2.mp3"
    ],
    "prompt": "[Verse] City hums under neon rain",
    "lyrics": "[Chorus] Brighter lights, we keep going on",
    "style": "Jazz",
    "title": "Relaxing Piano",
    "model": "V6",
    "callBackUrl": "https://example.com/callback",
    "vocalGender": "m",
    "styleWeight": 0.61,
    "weirdnessConstraint": 0.72,
    "audioWeight": 0.65,
    "duration": 20,
    "variety": 1,
    "personaId": "persona_123",
    "personaModel": "style_persona"
}'
Response Response Example
{
    "code": 200,
    "msg": "success",
    "data": {
        "taskId": "5c79****be8e"
    }
}
Previous
Generate Persona
Next
Suno Voice Validation Phrase Callbacks
Built with