API 文档AI 模型接口语音Fish Audio模型管理

查询模型列表

分页查询音色模型列表。可按标题、标签、作者、语种与授权状态过滤。

分页查询音色模型列表。可按标题、标签、作者、语种与授权状态过滤,也可只返回当前工作区拥有的模型。

同步接口:提交后立即返回分页结果。模型 _id 可作为语音合成接口的 reference_id 使用。

Base URL

  • https://api.autorouter.top — Production

Authentication

BearerAuth: http (bearer) 使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx

Endpoints

GET /fishaudio/model

查询音色模型列表

按分页与过滤条件返回模型列表。

Headers

NameTypeRequiredDescription
AuthorizationstringYes请求身份认证。格式:Bearer sk-xxxxxx

Query Parameters

NameTypeRequiredDescription
page_sizeintegerNo每页数量,默认 10,取值 [1, 100]
page_numberintegerNo页码,默认 1,最小 1
titlestring | nullNo按标题过滤
tagstring | string[] | nullNo按标签过滤
selfbooleanNo为 true 时仅返回当前工作区拥有的模型。默认 false
author_idstring | nullNo按作者 ID 过滤公开模型;self=true 时忽略
languagestring | string[] | nullNo按语种过滤
title_languagestring | string[] | nullNo按标题语种过滤
licensedbooleanNo为 true 时仅返回 Fish Audio 已授权音色;self=true 时忽略。默认 false
sort_bystringNo排序字段。可选值:score(默认)、task_count、created_at

selfboolean(可选)

是否只返回当前工作区拥有的模型。默认 false。

  • true:仅返回自己的模型;此时 author_id 与 licensed 会被忽略
  • false:按公开发现规则返回,可用 author_id、licensed 等条件过滤

sort_bystring(可选)

排序字段,默认 score。

  • score:综合评分
  • task_count:使用次数
  • created_at:创建时间

Responses

200: 查询成功

Content-Type: application/json

401: 无权限

Content-Type: application/json

503: 服务过载

Content-Type: application/json

请求示例

curl -X GET "https://api.autorouter.top/fishaudio/model?page_size=10&page_number=1&self=true&sort_by=created_at" \
  -H "Authorization: Bearer sk-xxxxxx"

响应示例

{
  "total": 1,
  "items": [
    {
      "_id": "7f8a9b0c1d2e3f4a5b6c7d8e",
      "type": "tts",
      "title": "My Voice",
      "description": "Cloned from a studio sample",
      "cover_image": "",
      "train_mode": "fast",
      "state": "trained",
      "tags": ["custom"],
      "samples": [],
      "created_at": "2026-09-20T01:00:00.000Z",
      "updated_at": "2026-09-20T01:00:00.000Z",
      "languages": ["en"],
      "visibility": "private",
      "lock_visibility": false,
      "default_text": "",
      "source": null,
      "licensed": false,
      "like_count": 0,
      "mark_count": 0,
      "shared_count": 0,
      "task_count": 0,
      "liked": false,
      "marked": false,
      "unliked": false,
      "author": {
        "_id": "64a1b2c3d4e5f67890123456",
        "nickname": "creator",
        "avatar": "https://example.com/avatar.png"
      }
    }
  ],
  "has_more": false,
  "total_is_exact": true,
  "window_limited": false,
  "max_offset": null,
  "accessible_upper_bound": null
}

响应字段说明:

NameTypeDescription
totalinteger符合条件的模型总数
itemsobject[]当前页的模型列表
has_moreboolean | null是否还有下一页
total_is_exactbooleantotal 是否为精确值,默认 true
window_limitedboolean是否受查询窗口限制,默认 false
max_offsetinteger | null最大偏移量
accessible_upper_boundinteger | null可访问的上界
items[]._idstring模型 ID,可用于语音合成的 reference_id
items[].typestring模型类型。tts 为文本转语音,svc 为歌声转换
items[].titlestring模型标题
items[].descriptionstring模型描述
items[].cover_imagestring封面图 URL
items[].train_modestring训练模式。fast 或 full
items[].statestring状态。枚举值:created、training、trained、failed
items[].tagsstring[]标签列表
items[].samplesobject[]试听样本
items[].created_atstring创建时间,ISO 8601
items[].updated_atstring更新时间,ISO 8601
items[].languagesstring[]语种列表
items[].visibilitystring可见性。枚举值:public、unlist、private
items[].licensedboolean是否为 Fish Audio 已授权音色
items[].like_countinteger点赞数
items[].task_countinteger使用次数
items[].authorobject作者信息

itemsobject[](必选)

当前页的模型列表。每项为完整模型对象。

_idstring(必选)

模型 ID。创建后可在语音合成接口的 reference_id 中使用。

statestring(必选)

模型状态。枚举值:created(已创建)、training(训练中)、trained(已完成)、failed(失败)。train_mode=fast 时通常很快变为 trained。

authorobject(必选)

作者信息,包含 _id、nickname、avatar。

错误处理

HTTP 401 / 403 鉴权错误

  • 401 Unauthorized:API Key 无效或已过期
  • 403 Forbidden:API Key 无权访问此模型(检查 token 的模型白名单)

HTTP 402 余额不足

返回 insufficient user quota。请前往 AutoRouter 控制台充值。

HTTP 503 服务过载

服务端负载过高,无法处理请求。请稍后重试。

目录