KIE.AI
old-model
  • All Model
  • old-model
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
language
language
  • 🇺🇸 English
  • 🇨🇳 Chinese
Support
old-model
  • All Model
  • old-model
old-model
  • All Model
  • old-model
Suno API
4o Image APIVeo3.1 APIRunway APIFlux Kontext API
Suno API
4o Image APIVeo3.1 APIRunway APIFlux Kontext API
  1. Music Generation
  • Suno API Quickstart
  • Music Generation
    • Music Cover Generation Callbacks
    • Music Generation Callbacks
    • Music Extension Callbacks
    • Audio Upload and Cover Callbacks
    • Audio Upload and Extension Callbacks
    • Add Instrumental Callbacks
    • Add Vocals Callbacks
    • Replace Music Section Callbacks
    • Generate Music
      POST
    • Extend Music
      POST
    • Upload And Cover Audio
      POST
    • Upload And Extend Audio
      POST
    • Add Instrumental to Music
      POST
    • Add Vocals to Music
      POST
    • Get Music Task Details
      GET
    • Get Timestamped Lyrics
      POST
    • Boost Music Style
      POST
    • Generate Music Cover
      POST
    • Get Cover Generation Details
      GET
    • Replace Music Section
      POST
    • Generate Persona
      POST
    • Generate Mashup Music
      POST
    • Recovery Audio
      POST
  • Lyrics Generation
    • Lyrics Generation Callbacks
    • Generate Lyrics
      POST
    • Get Lyrics Task Details
      GET
  • WAV Conversion
    • Convert to WAV Callbacks
    • Convert to WAV Format
    • Get WAV Conversion Details
  • Vocal Removal
    • Audio Separation Callbacks
    • MIDI Generation Callbacks
    • Vocal & Instrument Stem Separation
    • Get Vocal Separation Details
    • Generate MIDI from Audio
    • Get MIDI Generation Details
  • Music Video Generation
    • Music Video Generation Callbacks
    • Create Music Video
    • Get Music Video Details
  • Sounds Generation
    • Generate sounds
  • voice
    • Suno Voice Generation Callback
    • Suno Voice Validation Phrase Callback
    • Suno Voice Generate Verification Phrase API
    • Suno Voice Get Verification Phrase API
    • Suno Voice Create Custom Voice API
    • Suno Voice Get Custom Voice Records
    • Suno Voice Regenerate Verification Phrase
    • Suno Voice Check Availability API
  1. Music Generation

Upload And Extend Audio

POST
/api/v1/generate/upload-extend

Upload and Extend Music#

This API extends audio while preserving the original style, generating a longer and seamless audio track.

Parameter Usage Guide#

Character Limits
Character limits vary by model version:
Models V5_5 and V5: style (maximum 1,000 characters), title (maximum 100 characters), prompt (maximum 5,000 characters)
Models V4_5PLUS and V4_5: style (maximum 1,000 characters), title (maximum 100 characters), prompt (maximum 5,000 characters)
Model V4_5ALL: style (maximum 1,000 characters), title (maximum 80 characters), prompt (maximum 5,000 characters)
Model V4: style (maximum 200 characters), title (maximum 80 characters), prompt (maximum 3,000 characters)

When defaultParamFlag is true (Custom Parameter Mode):#

instrumental: true: Provide style, title, and uploadUrl. prompt and vocalGender are not required
instrumental: false: Provide style, title, and uploadUrl. prompt is optional and will be used as a prompt if provided. vocalGender is not required
continueAt: The point in seconds where the audio extension begins. It must be greater than 0 and less than the total duration of the uploaded audio
uploadUrl: The URL of the audio file. The audio must not exceed 8 minutes
Character limits vary by model version. See the details above

When defaultParamFlag is false (Non-Custom Parameter Mode):#

Regardless of the instrumental setting, only uploadUrl is required
prompt is optional and will be used as a prompt if provided
When instrumental is true, prompt and vocalGender are not required
When instrumental is false and prompt is not provided, lyrics will be generated automatically
Other parameters will use the parameters of the original audio

Developer Notes#

1.
Generated files will be retained for 14 days.
2.
The model version must match the source music.
3.
This feature is suitable for extending existing music.
4.
Please provide a valid audio URL for uploadUrl.

Optional Parameters#

ParameterTypeDescription
promptstringDescribes how the music should be extended. Optional. If provided, it will be used as a prompt. Not required when instrumental is true.
vocalGenderstringVocal gender preference. m represents male vocals and f represents female vocals. Not required for this API.
styleWeightnumberControls adherence to the specified style. Range: 0–1, with up to two decimal places. Example: 0.65.
weirdnessConstraintnumberControls the level of creativity. Range: 0–1, with up to two decimal places. Example: 0.65.
audioWeightnumberControls the weight of audio elements. Range: 0–1, with up to two decimal places. Example: 0.65.
personaIdstringAvailable only when defaultParamFlag is true. To generate a personaId, visit Generate Persona.

Callbacks

audioExtend

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

🟢200
application/json
Request successful
Bodyapplication/json

🔴500Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.kie.ai/api/v1/generate/upload-extend' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "uploadUrl": "https://storage.example.com/upload",
  "defaultParamFlag": true,
  "instrumental": true,
  "continueAt": 60,
  "model": "V4",
  "callBackUrl": "https://api.example.com/callback",
  "prompt": "Extend the music with more relaxing notes",
  "style": "Classical",
  "title": "Peaceful Piano Extended",
  "negativeTags": "Relaxing Piano",
  "vocalGender": "m",
  "styleWeight": 0.65,
  "weirdnessConstraint": 0.65,
  "audioWeight": 0.65,
  "personaId": "persona_123",
  "personaModel": "style_persona"
}'
Response Response Example
200 - Example 1
{
    "code": 200,
    "msg": "success",
    "data": {
        "taskId": "5c79****be8e"
    }
}
Previous
Upload And Cover Audio
Next
Add Instrumental to Music
Built with