音频转录
使用兼容 OpenAI 的 POST /v1/audio/transcriptions 端点转录音频。支持的模型、文件限制、curl 和 Python 示例,以及可选的异步 URL 任务 API。
兼容 OpenAI 的音频
使用 OpenAI JSON 结构进行语音合成。响应包含音频字节,默认为 MP3。
curl https://getvibeapi.com/v1/audio/speech \
-H "Authorization: Bearer $GETVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "chatterbox-turbo",
"input": "Hello from GetVibe",
"voice": "default",
"response_format": "mp3",
"speed": 1
}' \
--output speech.mp3可用模型包括 tts、gemini-tts、gemini-3.8-flash-tts、gemini-3.8-flash-lite-tts、gemini-3.8-flash-tts-lite、chatterbox-tts、kokoro-tts、chatterbox-turbo 和 gpt-4o-mini-tts。response_format(mp3、opus、aac、flac、wav、pcm)以及 speed 使用 OpenAI 格式;模型页面会列出任何更严格的原生限制。gpt-4o-mini-tts 接受 OpenAI 的 13 种语音(alloy、ash、ballad、coral、echo、fable、nova、onyx、sage、shimmer、verse、marin、cedar)以及可选的 instructions 字段,该字段会用通俗语言引导表达方式,例如 "speak calmly and warmly"。
声音克隆
voice-clone-tts 模型可以用你自己的声音朗读任何文本,包括俄语。首先,上传一段 3–60 秒的录音(wav 或 mp3,最大 10 MB)创建声音,只需创建一次,且免费。必须提供 consent: true:你需要确认这是你自己的声音,或已获得声音所有者的同意。每 24 小时最多可创建 20 个新声音。
curl https://getvibeapi.com/api/media/voices \
-H "Authorization: Bearer $GETVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My voice",
"consent": true,
"audio_url": "https://example.com/my-voice.wav"
}'答案包含 voice.id(voice_…)。在普通媒体请求中将其作为 opts.voice_id 传递;使用引擎 qwen3(默认,质量最佳)或 chatterbox(经济型)。按每 1000 个文本字符计费,每次请求最多 4000 个字符。
Premium voice,最接近目标声音。创建时添加 "engine": "premium";录音必须为 10–60 秒。创建费用为一次性 $2.00,且仅在成功创建语音时收取:发生错误时不收费,余额低于该价格时会在发送录音前返回 402。使用 MiniMax 引擎合成语音:minimax-speech-2.8-hd、minimax-speech-2.6-hd 或 minimax-speech-02-hd(每 1000 个字符 $0.125),其 Turbo 版本的价格为 $0.075;较旧的名称 premium / premium-turbo 表示 speech-02。创建后我们会立即使用该语音说出一个简短单词,因为 MiniMax 会删除连续 7 天未使用的语音。Premium voice 被删除后会立即停止工作,但合成服务不提供删除功能,创建费用也不予退还。
curl https://getvibeapi.com/api/media/generate \
-H "Authorization: Bearer $GETVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "voice-clone-tts",
"prompt": "Hello! This is my cloned voice.",
"opts": { "voice_id": "voice_Ab12Cd34Ef56Gh78Ij90", "language": "auto" }
}'语音仅供你的账户使用。使用 GET /api/media/voices 列出语音;使用 DELETE /api/media/voices/{voice_id} 删除语音,同时录音也会从合成服务中删除。我们不会自行保留录音。
ElevenLabs 语音。启用后,GET /api/media/voices 会在 pricing.elevenlabs_* 下列出其价格。使用 engine: "elevenlabs" 通过 10–60 秒的录音创建语音(语音名额有限:名额用尽时,响应为 409 voice_slots_full),然后使用 elevenlabs-v4 或 elevenlabs-v4-turbo 合成语音,可设置 stability、similarity_boost、speed、seed、language,以及直接写入文本的 [laughs] 等音频标签。第二个结果文件是包含单词时间信息的字幕 JSON。每 1000 个字符的价格:v4 $0.044,v4 Turbo $0.022,即截至 October 12, 2026 的促销价格;之后价格为 $0.16 和 $0.08。存储费用为每个语音每月 $0.70(包含第一个月;之后在语音创建日按月收费)。如果余额过低,语音会保留一个月,只有在下一次扣费时费用仍未支付才会删除,我们会先通过电子邮件通知你。在 My voices 下查看你的所有语音及其状态。
多条录音。 一个 ElevenLabs voice 最多可包含 25 条录音:创建时作为 samples 数组提供(每项为 {"audio_url"} 或 {"audio_base64"},wav/mp3,最大 10 MB;合计最大 50 MB,时长为 10–300 秒),之后可使用 POST /api/media/voices/{voice_id}/samples {"samples": […]} 添加。添加不收费;存储费用按每个 voice 收取一次。使用 "remove_background_noise": true 后,ElevenLabs 会免费移除录音中的背景噪声(默认关闭:它可能会使干净的录音变差)。
兼容 OpenAI 的转录
发送包含 file 和 model 的 multipart 请求。文件大小限制为 50 MB。响应为 { text: "..." }。
curl https://getvibeapi.com/v1/audio/transcriptions \
-H "Authorization: Bearer $GETVIBE_API_KEY" \
-F [email protected] \
-F model=whisper-large-v3 \
-F language=en
# → {"text":"..."}可用模型包括 speech-to-text、whisper-large-v3-turbo、nemotron-asr-multilingual 和 whisper-large-v3。当前每分钟价格见音频模型目录。文件大小必须介于 1 字节到 50 MB 之间。
时间戳和字幕
response_format 遵循 OpenAI:json(默认,{ text })、text(纯文本)、verbose_json(包含 language、duration 和 segments[] 的 JSON — id, start, end, text 以秒为单位)、srt 和 vtt(可直接使用的字幕)。如需字词级时间戳,请发送 timestamp_granularities[]=word 并指定 verbose_json(字段 words[]:word, start, end);segment 和 word 可以组合使用。价格不受格式影响。
# SRT subtitles (or vtt); verbose_json returns JSON with segments[] and words[]
curl https://getvibeapi.com/v1/audio/transcriptions \
-H "Authorization: Bearer $GETVIBE_API_KEY" \
-F [email protected] \
-F model=whisper-large-v3 \
-F response_format=srt
curl https://getvibeapi.com/v1/audio/transcriptions \
-H "Authorization: Bearer $GETVIBE_API_KEY" \
-F [email protected] \
-F model=whisper-large-v3 \
-F response_format=verbose_json \
-F "timestamp_granularities[]=segment" \
-F "timestamp_granularities[]=word"
# → {"task":"transcribe","language":"en","duration":5.9,"text":"...",
# "segments":[{"id":0,"start":0.03,"end":0.71,"text":"Hello!"}, ...],
# "words":[{"word":"Hello!","start":0.03,"end":0.51}, ...]}时间戳来自 whisper-large-v3、whisper-large-v3-turbo、nemotron-asr-multilingual、qwen3-asr-1.7b 和 speech-to-text(其分段基于词级时间信息构建)。universal-2、voxtral-small-24b-2507 和 nemotron-3-diarization 不返回时间戳,因此对它们使用 verbose_json / srt / vtt 时,请求会在产生任何费用之前被拒绝,并返回 400。
universal-2。旧版 /api/transcribe 接受公开的 audio_url,异步运行,并由操作员通过 TRANSCRIBE_ENABLED 启用;否则会返回 503。旧版 URL 转录
从公共 URL 异步转录音频。你需要创建任务,并通过我们的 id 轮询结果。
创建参数
| 参数 | 类型 | 描述 |
|---|---|---|
audio_urlreq. | 字符串(URL) | 音频文件的公开链接。 |
language | string | 语言代码,例如 ru、en(2-10 个字符)。可选,不提供时自动检测。 |
redact_pii | boolean | 个人数据脱敏。默认开启(符合 152-FZ);仅在明确设置 redact_pii: false 时禁用。 |
创建并轮询
创建操作返回 202 和 { id, status: "processing" }。轮询 GET /api/transcribe/{id},直到状态为 success(或 fail);随后响应中会包含 text、durationSec、priceRub。
# 1. create a transcription job (audio by public URL)
curl https://getvibeapi.com/api/transcribe \
-H "Authorization: Bearer $GETVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"audio_url": "https://example.com/audio.mp3",
"language": "en",
"redact_pii": true
}'
# → {"id":"...","status":"processing"}