Skip to main content
POST
/
eleven
/
upload
上传音频(Inpainting 前置步骤)
curl --request POST \
  --url https://api.mountsea.ai/eleven/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "audioUrl": "https://example.com/song.mp3",
  "extractCompositionPlan": false
}
'
{
  "taskId": "<string>"
}
This endpoint is only available to enterprise customers with Inpainting permissions.
Upload an existing audio file to ElevenLabs and obtain a song_id for use with Inpainting editing.
This is an async task. The response contains a taskId — use Get Task Status to poll for the songId and optional compositionPlan.

Inpainting Workflow

1

Upload audio

Call POST /eleven/upload with the audio URL to get a song_id.
2

Reference in composition plan

In POST /eleven/music, use the song_id in compositionPlan.sections[].source_from to reference specific segments of the uploaded song.
3

Define edit ranges

Use source_from.range to specify the time range to keep, and negative_ranges to exclude sub-sections within that range.
Set extractCompositionPlan: true to also extract the uploaded audio’s structure as a composition plan, which you can then modify and use for regeneration.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
audioUrl
string
required

音频文件 URL (http/https),支持格式: .mp3, .wav, .flac, .m4a, .aac, .ogg, .wma, .opus

Pattern: AUDIO_EXTENSION_REGEX
Example:

"https://example.com/song.mp3"

extractCompositionPlan
boolean
default:false

是否提取并返回上传音频的作曲计划(composition_plan)。设为 true 时,响应中将包含解析出的段落结构信息,但会增加接口延迟

Response

200 - application/json

任务创建成功

taskId
string
required

任务 ID,用于后续查询结果