API 文档AI 模型接口语音Fish Audio模型管理
更新模型
更新已有音色模型的标题、描述、封面、可见性或标签。
按模型 ID 部分更新已有音色模型的元数据,包括标题、描述、封面、可见性与标签。未传入的字段保持不变。
同步接口:仅更新元数据,不会重新训练音色。若上传封面图,请使用 multipart/form-data,由 HTTP 客户端自动设置 multipart Content-Type 的 boundary。
Base URL
https://api.autorouter.top— Production
Authentication
BearerAuth: http (bearer)
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
Endpoints
PATCH /fishaudio/model/{id}
更新音色模型
根据模型 ID 更新指定字段。所有请求体字段均为可选,只提交需要修改的字段。
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | 请求身份认证。格式:Bearer sk-xxxxxx |
Content-Type | string | Yes | application/json、multipart/form-data、application/x-www-form-urlencoded 或 application/msgpack。上传封面图时使用 multipart/form-data |
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | 模型 ID |
Request Body
Content-Type: application/json
Example:
{
"title": "My Voice (Updated)",
"description": "Updated description",
"visibility": "unlist",
"tags": ["custom", "studio"]
}Properties:
| Name | Type | Required | Description |
|---|---|---|---|
title | string | null | No | 模型标题 |
description | string | null | No | 模型描述 |
cover_image | file | null | No | 封面图。上传文件时请使用 multipart/form-data |
visibility | string | null | No | 可见性。可选值:public、unlist、private |
tags | string | string[] | No | 模型标签 |
visibilitystring | null(可选)
模型可见性。
private:仅创建者可见unlist:知道链接的人可访问public:公开展示。通过 API 传入public可能被降级为private,公开发布请走网页发布流程
Responses
200: 更新成功
Content-Type: application/json
401: 无权限
Content-Type: application/json
503: 服务过载
Content-Type: application/json
请求示例
curl -X PATCH "https://api.autorouter.top/fishaudio/model/{id}" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxx" \
-d '{
"title": "My Voice (Updated)",
"description": "Updated description",
"visibility": "unlist",
"tags": ["custom", "studio"]
}'响应示例
{}响应字段说明:
成功时响应体可为空。失败时返回错误对象:
| Name | Type | Description |
|---|---|---|
status | integer | 错误状态码(失败时) |
message | string | 错误说明(失败时) |
reason | string | null | 补充原因,可为 null |
错误处理
HTTP 401 / 403 鉴权错误
401 Unauthorized:API Key 无效或已过期403 Forbidden:API Key 无权访问此模型(检查 token 的模型白名单)
HTTP 402 余额不足
返回 insufficient user quota。请前往 AutoRouter 控制台充值。
HTTP 503 服务过载
服务端负载过高,无法处理请求。请稍后重试。