> ## 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 上传素材

> [!NOTE]
>
> **国内用户请注意：** 中国大陆用户请使用 `https://toapis.cn` 作为接口地址（Base URL）。文档示例中的 `https://toapis.com` 请替换为 `https://toapis.cn`。

本页覆盖四个操作，共用一个入口，路径中的 `{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.