AI Music API
Home
Home
    • Introduction
    • Credits Usage Guide
    • AI 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
      • remaster
        POST
      • replace section
        POST
      • add vocal
        POST
      • add instrumental
        POST
      • upload music
        POST
      • get music
        GET
    • riffusion(Deprecated)
      • Riffusion instructions
      • create music (with lyrics)
      • create music (with description)
      • cover music
      • extend music
      • replace music section
      • swap music sound
      • swap music vocals
      • upload
      • get music
    • producer
      • Producer Instructions
      • Complete Request Example
      • create music
      • upload
      • download
      • get music
    • nuro
      • Nuro Instruction
      • Error handling
      • create vocal music
      • create instrument music
      • get music
    • lyrics generation
      • Make Lyrics
    • get-credits
      GET
    • Schemas
      • 记录不存在
      • 参数不正确
    Home
    Home

    Special Scenarios

    Special Scenarios: Working with Uploaded Audio#

    This guide covers how to work with your own uploaded audio files, including extending, covering, and creating personas from uploaded music.

    Overview#

    When working with your own audio files, the workflow is:
    1. Upload audio → Get clip_id
    2. Use clip_id for extend/cover/persona operations

    Step 1: Upload Your Audio#

    First, upload your audio file to get a clip_id:

    Requirements#

    RequirementValue
    Durationmax 8min
    FormatMP3, WAV, or common audio formats
    SourceMust be accessible via public URL
    RightsCopyright-free or owned by you

    Response#

    {
      "code": 200,
      "message": "success",
      "clip_id": "abc123-def456-..."
    }
    Processing Time: Approximately 20 seconds to receive the official clip_id.

    Method 1: Extend Uploaded Music#

    Extend your uploaded track by adding new content that continues from a specific point.

    Request#

    POST /api/v1/sonic/create
    
    {
      "task_type": "extend_upload_music",
      "continue_clip_id": "your-uploaded-clip-id",
      "continue_at": 0.1,
      "custom_mode": true,
      "mv": "sonic-v4-5",
      "prompt": "[Verse 2]\nContinuing the song...\n\n[Chorus]\nNew chorus lyrics",
      "tags": "pop, upbeat"
    }

    Key Parameters#

    ParameterValueDescription
    task_typeextend_upload_musicMust use this for uploaded files
    continue_clip_idYour clip_idThe uploaded audio's clip_id
    continue_at0.1Start extending from 0.1 seconds (recommended)

    Result#

    The generated music will maintain the acoustic characteristics of your original uploaded audio.
    Important: Use extend_upload_music, not extend_music, for uploaded files.

    Method 2: Cover Uploaded Music#

    Create a cover version of your uploaded track with style transformation.

    Request#

    POST /api/v1/sonic/create
    
    {
      "task_type": "cover_upload_music",
      "continue_clip_id": "your-uploaded-clip-id",
      "custom_mode": true,
      "mv": "sonic-v4-5",
      "prompt": "[Verse]\nNew lyrics for the cover...\n\n[Chorus]\nCover chorus",
      "tags": "jazz, smooth, acoustic",
      "audio_weight": 0.6
    }

    Key Parameters#

    ParameterValueDescription
    task_typecover_upload_musicMust use this for uploaded files
    continue_clip_idYour clip_idThe uploaded audio's clip_id
    audio_weight0-1How much original audio influences the cover

    Audio Weight Guide#

    ValueEffect
    0.0 - 0.3More creative freedom, less like original
    0.4 - 0.6Balanced mix
    0.7 - 1.0Closer to original sound

    Result#

    The output matches the sonic qualities of your source material while applying the new style.
    Important: Use cover_upload_music, not cover_music, for uploaded files.

    Method 3: Create Persona from Uploaded Music#

    Create a reusable voice profile (persona) from your uploaded audio, then use it to generate diverse compositions.

    Step 1: Create Persona#

    POST /api/v1/sonic/persona
    
    {
      "name": "My Custom Voice",
      "clip_id": "your-uploaded-clip-id",
      "describe": "Warm, soulful vocal with smooth tone",
      "styles": "soul, r&b, smooth"
    }

    Response#

    {
      "code": 200,
      "persona_id": "persona-abc123-...",
      "message": "success"
    }

    Step 2: Generate Music with Persona#

    POST /api/v1/sonic/create
    
    {
      "task_type": "persona_music",
      "persona_id": "persona-abc123-...",
      "custom_mode": true,
      "mv": "sonic-v4-5",
      "prompt": "[Verse]\nBrand new song with my voice\n\n[Chorus]\nSinging in my style",
      "tags": "pop, dance"
    }

    Benefits of Personas#

    BenefitDescription
    ReusableCreate once, use unlimited times
    ConsistentSame voice across different songs
    FlexibleGenerate any genre while keeping the voice
    Cost-effective1 credit to create, then normal generation costs

    One-Stop APIs (Recommended)#

    For convenience, use the one-stop APIs that combine upload and extend/cover in a single request:

    Upload + Extend#

    POST /api/v1/sonic/upload-extend
    
    {
      "url": "https://your-audio-file-url.mp3",
      "mv": "sonic-v4-5",
      "custom_mode": true,
      "prompt": "[Verse]\nExtension lyrics...",
      "tags": "pop",
      "continue_at": 0.1,
      "auto_concat": true
    }

    Upload + Cover#

    POST /api/v1/sonic/upload-cover
    
    {
      "url": "https://your-audio-file-url.mp3",
      "mv": "sonic-v4-5",
      "custom_mode": true,
      "prompt": "[Verse]\nCover lyrics...",
      "tags": "jazz, acoustic",
      "audio_weight": 0.5
    }

    Auto-Concat Feature#

    When auto_concat: true, the system automatically concatenates the extended segment with the original, giving you the full track without a separate concat call.

    Task Type Reference#

    ScenarioTask Type
    Extend platform-generated musicextend_music
    Extend your uploaded musicextend_upload_music
    Cover platform-generated musiccover_music
    Cover your uploaded musiccover_upload_music
    Generate with personapersona_music

    Complete Workflow Example#

    Goal: Create a full song from your uploaded audio#

    Step 1: Upload audio
            ↓
    Step 2: Extend with extend_upload_music
            ↓
    Step 3: Concat to get full track
            ↓
    Done!

    Or use one-stop API:#

    Step 1: Use upload-extend with auto_concat: true
            ↓
    Done! (Full track ready)

    Tips#

    1.
    Use 0.1 seconds for continue_at: Starting from 0.1s ensures smooth continuation
    2.
    Match the style: Use similar tags to your original for cohesive results
    3.
    Persona for consistency: If you need multiple songs with the same voice, create a persona first
    4.
    One-stop APIs save time: Use upload-extend or upload-cover for simpler workflows
    5.
    Auto-concat for full tracks: Enable auto_concat to get complete songs automatically
    Modified at 2026-01-24 15:09:10
    Previous
    AI Music API FAQ & Troubleshooting
    Next
    Error handling
    Built with