> ## Documentation Index
> Fetch the complete documentation index at: https://docs.toapis.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 續寫與上傳

> extend 續寫已有歌曲,uploadTask/uploadCover/uploadExtend 上傳素材

本頁覆蓋四個操作,共用一個入口,路徑中的 `{operation}` 決定行為:

```
POST https://toapis.com/v1/music/generations/{operation}
```

## Authorizations

**Authorization** `string` *required*

使用 Bearer Token 認證,取得 API Key:[API Key 管理頁面](https://toapis.com/console/token)

## extend — 續寫歌曲($0.05,Max $0.10)

從已有任務的指定時間點繼續生成。`custom` 預設 `true`(續寫通常帶歌詞)。

**model** `string` *required*

固定 `"suno"`

**task\_id** `string` *required*

源任務 ID

**continue\_at** `number` *required*

續寫起點(秒)

**audio\_index** `number`

源曲目序號(任務含多軌時使用)

**prompt** `string`

續寫歌詞(custom 模式)

**title** `string`

標題

**style** `string`

風格標籤

**max\_mode** `boolean`

Max 檔 \$0.10

```bash theme={null}
curl --request POST \
  --url https://toapis.com/v1/music/generations/extend \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{"model":"suno","task_id":"tsk_aud_xxx","continue_at":60,"prompt":"[Chorus] 副歌歌詞..."}'
```

## uploadTask — 上傳音訊登記(\$0.004)

將公網音訊登記為任務,產物可作為 `sample`/`addVocals`/`addInstrumental`/`addStem` 的源(這幾類操作**只接受上傳源**)。

**model** `string` *required*

固定 `"suno"`

**audioFilePath** `string` *required*

公網可存取的音訊 URL

> [!WARNING]
>
> 只傳 `model` + `audioFilePath`,不要附帶 `version` 等多餘欄位。

```bash theme={null}
curl --request POST \
  --url https://toapis.com/v1/music/generations/uploadTask \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{"model":"suno","audioFilePath":"https://example.com/my-vocals.mp3"}'
```

## uploadCover — 上傳翻唱($0.05,Max $0.10)

上傳音訊並用指定風格翻唱。

**model** `string` *required*

固定 `"suno"`

**audio\_url** `string` *required*

源音訊 URL

**custom** `boolean`

自訂歌詞模式

**prompt** `string`

歌詞(custom=true)/ 描述

**gpt\_description** `string`

靈感描述(custom=false 時必填)

**style** `string`

目標風格

**persona\_id** `string`

人聲角色,與 `custom_model_id` 互斥

**max\_mode** `boolean`

Max 檔

## uploadExtend — 上傳續寫($0.05,Max $0.10)

上傳音訊並從指定時間點續寫,恆按自訂模式處理。

**model** `string` *required*

固定 `"suno"`

**audio\_url** `string` *required*

源音訊 URL

**continue\_at** `number` *required*

續寫起點(秒)

**prompt** `string`

續寫歌詞

**style** `string`

風格

**max\_mode** `boolean`

Max 檔

## Response

**task\_id** `string`

任務 ID,用於查詢狀態

**status** `string`

`submitted`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.