APIMODELSAPIMODELS
API 文档

apimodels.app

语音 · TTS

音色与音色复刻 API

查 MiniMax、ElevenLabs、Fish Audio 的预设音色,或用一段样本复刻你自己的音色,然后在任何 TTS 调用里使用。覆盖公开音色库、Minimax(复刻 / 系统音色)和 ElevenLabs 自定义音色。

浏览全部预设音色

一个公开接口查三家的预设音色:MiniMax 全部系统音色、ElevenLabs 官方预设与完整的共享音色库、Fish Audio 全部官方授权音色和大量社区音色。不需要 API Key,浏览器可以直接调用(CORS 已开)。目录每天更新一次,结果缓存 5 分钟。

打开音色库页面
分页查询音色
GET https://api.apimodels.app/v1/voices/catalog
各家总数与分布
GET https://api.apimodels.app/v1/voices/catalog/manifest
# Public endpoint: no API key, CORS enabled, cached for 5 minutes.

# ElevenLabs: English female voices, most-used first
curl "https://api.apimodels.app/v1/voices/catalog?provider=elevenlabs&language=en&gender=female&page_size=20"

# Fish Audio: licensed Japanese voices
curl "https://api.apimodels.app/v1/voices/catalog?provider=fish&source=licensed&language=ja"

# MiniMax: Cantonese system voices (Cantonese is "yue"), A-Z
curl "https://api.apimodels.app/v1/voices/catalog?provider=minimax&language=yue&sort=name"

# Totals per provider, plus counts by source and by language
curl "https://api.apimodels.app/v1/voices/catalog/manifest"

查询参数

字段必填类型说明
provider建议stringminimax | elevenlabs | fish
source否stringminimax:system;elevenlabs:premade(官方预设)| professional | library(共享音色库);fish:licensed(官方授权)| community(社区)
language否stringISO 639-1 代码,如 en、ja、es;粤语是 yue
gender否stringfemale | male | neutral(MiniMax 只给名称里能明确看出性别的音色打标;Fish 没有性别字段)
q否string搜索名称、ID、描述、口音和用途
sort否stringpopular(默认,按使用量)| name
page否integer页码,从 1 开始
page_size否integer每页条数,默认 50,最多 100

响应字段

字段必填类型说明
data.total—integer符合条件的音色总数
data.page / page_size / has_more—int / int / bool分页信息;has_more 为 true 时 page+1 继续翻
data.items[].id—string音色 ID:MiniMax / ElevenLabs 填 voice_id,Fish Audio 填 reference_id
data.items[].name / provider / source—string名称、厂商、来源
data.items[].languages—string[]ISO 639-1 语言代码,可能为空
data.items[].gender / age / accent可能缺省string性别、年龄段、口音(多见于 ElevenLabs)
data.items[].description / use_case可能缺省string描述与推荐用途
data.items[].preview_url可能缺省string试听音频地址,生成前先听一下(ElevenLabs 和 Fish Audio 有;MiniMax 系统音色没有)
data.items[].uses / likes可能缺省integer该音色在厂商自己平台上的使用量 / 点赞数,popular 排序据此
data.generated_at—string目录生成时间(UTC)
data.usage—object每家的音色 ID 填哪个字段

manifest 返回 { version, generated_at, providers: { minimax | elevenlabs | fish: { total, by_source, by_language } }, usage }。

响应示例(只保留一个音色)

{
  "code": 200,
  "msg": "success",
  "data": {
    "total": 3739,
    "page": 1,
    "page_size": 20,
    "has_more": true,
    "items": [
      {
        "id": "tnSpp4vdxKPjI9w0GnoV",
        "name": "Hope - upbeat and clear",
        "provider": "elevenlabs",
        "source": "library",
        "languages": ["en", "fr", "es", "de", "pt"],
        "gender": "female",
        "age": "young",
        "accent": "american",
        "description": "upbeat",
        "use_case": "social_media",
        "preview_url": "https://storage.googleapis.com/eleven-public-prod/custom/voices/tnSpp4vdxKPjI9w0GnoV/LiIyxRT1qFJ1QJPr8sWl.mp3",
        "uses": 1413857
      }
    ],
    "generated_at": "2026-10-29T15:25:41.771Z",
    "usage": {
      "minimax": "Pass id as voice_id (or voice_setting.voice_id) to any minimax-speech-* model on /v1/audio/generations",
      "elevenlabs": "Pass id as voice_id to any ElevenLabs TTS model on /v1/audio/generations",
      "fish": "Pass id as reference_id to fish-s2.1-pro / fish-drama-3 on /v1/audio/generations. ..."
    }
  }
}

把查到的 id 用进合成请求

ElevenLabs 和 MiniMax 把 id 填进 voice_id(MiniMax 走 /v1/minimax/tts 时填 voice_setting.voice_id),Fish Audio 填 reference_id。Fish 官方授权音色计费更高:S2.1 Pro 按 2 倍、Drama 3 按 2.5 倍;社区音色由用户上传,部分模仿真人,商用前请确认权利。

# Take an item's "id" straight into a TTS request.

# ElevenLabs -> voice_id
curl -X POST https://api.apimodels.app/v1/audio/generations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "eleven-tts-v3", "text": "Hello from the voice library.", "voice_id": "tnSpp4vdxKPjI9w0GnoV" }'

# Fish Audio -> reference_id
curl -X POST https://api.apimodels.app/v1/audio/generations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "fish-s2.1-pro", "text": "こんにちは。", "reference_id": "297a6fd278df47c3b9da9bfdf55ac89a" }'

# MiniMax -> voice_id on /v1/audio/generations, or voice_setting.voice_id on /v1/minimax/tts
curl -X POST https://api.apimodels.app/v1/minimax/tts \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "minimax-speech-2.8-turbo", "text": "歡迎收聽。", "voice_setting": { "voice_id": "Cantonese_GentleLady" } }'

查音色 → 合成(Python / Node)

cURL

# 1) Find a voice (no API key)
curl "https://api.apimodels.app/v1/voices/catalog?provider=elevenlabs&language=en&gender=female&page_size=20"

# 2) Speak with it (items[0].id -> voice_id)
curl -X POST https://api.apimodels.app/v1/audio/generations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "eleven-tts-v3", "text": "Hello from the voice library.", "voice_id": "tnSpp4vdxKPjI9w0GnoV" }'

Python

import os, requests

CATALOG = "https://api.apimodels.app/v1/voices/catalog"
API = "https://api.apimodels.app/v1"
H = {"Authorization": f"Bearer {os.environ['API_KEY']}", "Content-Type": "application/json"}

# 1) Find a voice. The catalog needs no API key.
data = requests.get(CATALOG, params={
    "provider": "elevenlabs", "language": "en", "gender": "female", "page_size": 20,
}).json()["data"]
voice = data["items"][0]
print(data["total"], voice["name"], voice["id"])
print("audition first:", voice.get("preview_url"))  # ElevenLabs and Fish; MiniMax has none

# 2) Speak with it. ElevenLabs and MiniMax take the id as voice_id, Fish Audio as reference_id.
task = requests.post(f"{API}/audio/generations", headers=H, json={
    "model": "eleven-tts-v3",
    "text": "Hello from the voice library.",
    "voice_id": voice["id"],
}).json()
print(task["data"]["taskId"])

# Fish Audio:  {"model": "fish-s2.1-pro", "text": "...", "reference_id": voice["id"]}
# MiniMax:     {"model": "minimax-speech-2.8-turbo", "text": "...", "voice_id": voice["id"]}

Node.js

const CATALOG = "https://api.apimodels.app/v1/voices/catalog";
const API = "https://api.apimodels.app/v1";
const H = { Authorization: `Bearer ${process.env.API_KEY}`, "Content-Type": "application/json" };

// 1) Find a voice. The catalog needs no API key.
const qs = new URLSearchParams({ provider: "fish", source: "licensed", language: "ja" });
const { data } = await fetch(`${CATALOG}?${qs}`).then((r) => r.json());
const voice = data.items[0];
console.log(data.total, voice.name, voice.id, voice.preview_url);

// 2) Speak with it. Fish Audio takes the id as reference_id.
const task = await fetch(`${API}/audio/generations`, {
  method: "POST",
  headers: H,
  body: JSON.stringify({ model: "fish-s2.1-pro", text: "こんにちは。", reference_id: voice.id }),
}).then((r) => r.json());
console.log(task.data.taskId);

端点一览

全部预设音色(公开)
GET /voices/catalog · /voices/catalog/manifest
列出系统音色
GET /minimax/voices · /audio/voices
列出我的音色
GET /voices?source=account
上传样本
POST /minimax/files
复刻音色
POST /minimax/voice/clone
可灵自定义音色
POST /audio/voices/custom · GET /audio/voices/{task_id}

⚠️ 计费提示:语音复刻 $1.41/次(成功才扣,失败自动退还)。使用系统预置音色无任何额外费用。

1. 列出音色

拿到 voice_id 后,把它填进 TTS 调用即可。系统音色免费、即用;account 来源会返回你自己复刻 / 自定义的音色。 要跨三家查全部预设音色(含试听地址),用上面的公开音色库接口。

# Minimax system voices (optionally filter by language)
curl "https://api.apimodels.app/v1/minimax/voices?language=English" \
  -H "Authorization: Bearer $API_KEY"

# ElevenLabs / preset voices
curl "https://api.apimodels.app/v1/audio/voices?pageNum=1&pageSize=30" \
  -H "Authorization: Bearer $API_KEY"

# Voices on your own account (cloned / custom)
curl "https://api.apimodels.app/v1/voices?source=account" \
  -H "Authorization: Bearer $API_KEY"

响应(Minimax 示例)

{
  "voices": [
    { "voice_id": "English_Graceful_Lady", "name": "Graceful Lady", "language": "English" },
    { "voice_id": "male-qn-qingse", "name": "Qingse", "language": "Chinese" }
  ],
  "total": 2
}

2. 复刻音色(三步)

准备一段清晰的人声样本(建议 10 秒-5 分钟、无背景噪音)。上传拿到 file_id → 复刻成你指定的 voice_id → 在 TTS 里使用。

步骤 1:上传样本

# Step 1 — upload your voice sample (10s-5min clean audio)
curl -X POST https://api.apimodels.app/v1/minimax/files \
  -H "Authorization: Bearer $API_KEY" \
  -F "purpose=voice_clone" \
  -F "file=@my-voice-sample.mp3"   # mp3 / m4a / wav, <= 20MB
# -> { "file": { "file_id": 123456789, ... } }

步骤 2:复刻

# Step 2 — clone it. voice_id is optional (generated if omitted); if you set one: 8-256 chars, starts with a letter, letters/digits/-/_ only, must not end with - or _
curl -X POST https://api.apimodels.app/v1/minimax/voice/clone \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_id": 123456789,
    "voice_id": "myBrandVoice01"
  }'
字段必填类型说明
file_id二选一number步骤 1 上传返回的文件 ID(样本 mp3 / m4a / wav,≤ 20MB)
voice_url二选一string可公开访问的样本音频 URL,代替 file_id
voice_id否string新音色的 ID;省略则由接口生成并在响应里返回。自定义时须 8–256 字符、字母开头、只含字母/数字/-/_、不以 - 或 _ 结尾
text否string可选试听文本;传了就必须同时传 model,响应里多一个 demo_audio
model随 textstring试听用的 TTS 模型,如 minimax-speech-02-hd;不传 text 时不要传

步骤 3:用复刻音色合成

# Step 3 — use the cloned voice in TTS
curl -X POST https://api.apimodels.app/v1/minimax/tts \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-speech-02-turbo",
    "text": "This sentence is spoken in my own cloned voice.",
    "voice_setting": { "voice_id": "myBrandVoice01", "speed": 1.0 }
  }'

完整三步(Python / Node)

cURL

# Step 2 — clone it. voice_id is optional (generated if omitted); if you set one: 8-256 chars, starts with a letter, letters/digits/-/_ only, must not end with - or _
curl -X POST https://api.apimodels.app/v1/minimax/voice/clone \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_id": 123456789,
    "voice_id": "myBrandVoice01"
  }'

Python

import os, requests

API = "https://api.apimodels.app/v1"
H = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

# 1) Upload the sample
file_id = requests.post(
    f"{API}/minimax/files",
    headers=H,
    data={"purpose": "voice_clone"},
    files={"file": open("my-voice-sample.mp3", "rb")},
).json()["file"]["file_id"]

# 2) Clone -> your new voice_id
requests.post(
    f"{API}/minimax/voice/clone",
    headers={**H, "Content-Type": "application/json"},
    json={"file_id": file_id, "voice_id": "myBrandVoice01"},
)

# 3) Speak with it
audio = requests.post(
    f"{API}/minimax/tts",
    headers={**H, "Content-Type": "application/json"},
    json={
        "model": "minimax-speech-02-turbo",
        "text": "This sentence is spoken in my own cloned voice.",
        "voice_setting": {"voice_id": "myBrandVoice01"},
    },
)
print(audio.json())

Node.js

const API = "https://api.apimodels.app/v1";
const H = { Authorization: `Bearer ${process.env.API_KEY}` };
import fs from "node:fs";

// 1) Upload the sample
const form = new FormData();
form.append("purpose", "voice_clone");
form.append("file", new Blob([fs.readFileSync("my-voice-sample.mp3")]), "sample.mp3");
const { file } = await fetch(`${API}/minimax/files`, { method: "POST", headers: H, body: form })
  .then((r) => r.json());

// 2) Clone -> your new voice_id
await fetch(`${API}/minimax/voice/clone`, {
  method: "POST",
  headers: { ...H, "Content-Type": "application/json" },
  body: JSON.stringify({ file_id: file.file_id, voice_id: "myBrandVoice01" }),
});

// 3) Speak with it
const audio = await fetch(`${API}/minimax/tts`, {
  method: "POST",
  headers: { ...H, "Content-Type": "application/json" },
  body: JSON.stringify({
    model: "minimax-speech-02-turbo",
    text: "This sentence is spoken in my own cloned voice.",
    voice_setting: { voice_id: "myBrandVoice01" },
  }),
}).then((r) => r.json());
console.log(audio);

3. 可灵自定义音色(给 kling-tts 用)

用一段 5–30 秒、只有一个人声、没有杂音的样本(mp3 / wav / mp4 / mov,可公开访问的 URL,或先用 Files API 上传)创建可灵自定义音色。创建是异步的:先拿到 task_id,轮询 GET /audio/voices/{task_id} 到 task_status 为 succeed,再把 task_result.voices[0].voice_id 传给 kling-tts。每个音色 $0.007,音色可用时才扣,创建失败不扣。自定义音色只有创建它的账号能查询、删除和使用。

# 1) Create a Kling custom voice from a 5–30 s clean sample (returns a task_id)
curl -X POST https://api.apimodels.app/v1/audio/voices/custom \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "voice_name": "My Narrator",
    "voice_url": "https://r2.apimodels.app/uploads/.../sample.mp3"
  }'

# 2) Poll until task_status is "succeed"; read task_result.voices[0].voice_id
curl https://api.apimodels.app/v1/audio/voices/TASK_ID \
  -H "Authorization: Bearer $API_KEY"

# 3) Use it with kling-tts (only your own account can use your custom voices)
curl -X POST https://api.apimodels.app/v1/audio/generations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "kling-tts", "text": "Hello there", "voice_id": "VOICE_ID" }'

# List your custom voices / delete one
curl https://api.apimodels.app/v1/audio/voices/custom -H "Authorization: Bearer $API_KEY"
curl -X POST https://api.apimodels.app/v1/audio/voices \
  -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
  -d '{ "action": "delete", "voice_id": "VOICE_ID" }'
字段必填类型说明
voice_name是string音色名称,最多 20 个字符
voice_url二选一string可公开访问的样本音频 URL
video_id二选一string可灵生成视频的 ID(代替 voice_url;需是开了声音的 2.6 视频)

常见问题

怎么拿到 ElevenLabs、MiniMax 或 Fish Audio 的音色 ID 列表?

调用 GET https://api.apimodels.app/v1/voices/catalog,provider 填 elevenlabs、minimax 或 fish。不需要 API Key,支持 language、gender、source、q、sort 筛选,每页最多 100 个音色。GET /v1/voices/catalog/manifest 返回总数。同一份数据也可以在 apimodels.app/voices 页面上浏览。

音色 ID 填在请求的哪个字段?

MiniMax 和 ElevenLabs 的模型在 /v1/audio/generations 上填 voice_id(走 /v1/minimax/tts 时填 voice_setting.voice_id);fish-s2.1-pro 和 fish-drama-3 填 reference_id。目录接口的每个响应里也带一个 usage 字段,按厂商写明了这一点。

生成之前能先听一下音色吗?

ElevenLabs 和 Fish Audio 可以:目录里每个音色都带 preview_url 试听音频。MiniMax 的系统音色没有官方试听,可以在模型页里合成一句短句来听。