Текст в речь
Клонирование голоса
Липсинк
Другое
Текст в речь
Клонирование голоса
Липсинк
Другое
Текст в речь — HTTP v2
Synthesize speech over HTTP with voice ID and optional engine controls.
Text to Speech (HTTP v2)
POST /api/open/v2/speech/tts. Send a JSON body with your text, voice ID, and optional engine and synthesis options. Authenticate with Authorization: Bearer, or pass the token in the JSON body.
Endpoint
POST /api/open/v2/speech/tts
Request Headers
Content-Type
stringheaderrequired
application/json
Authorization
stringheaderrequired
Bearer <token> (API ключ)
Request Parameters
application/json
voiceId
stringrequired
Voice ID.
modelId
stringoptional
Engine model ID.
Available options:fishaudio-s2pro-enterprisefishaudio-s2profishaudio-s1minimax-2.8-turbominimax-2.8-hdminimax-2.6-turbominimax-2.6-hdqwen3-tts-flash
text
stringrequired
Text to synthesize.
format
stringoptionaldefault: mp3
Output audio format.
Available options:mp3wavogg
speed
numberoptionaldefault: 1
Speech speed multiplier (0.5–2.0).
volume
numberoptionaldefault: 0
Output volume (-20..20).
stability
numberoptional
Stability / expressiveness (0.5–1.5; Fish Audio engines only).
similarity
numberoptional
Similarity (0.5–1.5; Fish Audio engines only).
pitch
numberoptional
Pitch in semitones (-12–12; Minimax/Qwen engines only).
language
stringoptional
Language hint / overlay.
emotion
stringoptional
Speaking emotion (Minimax engine only).
Available options:happysadangryfearfuldisgustedsurprisedcalm
token
string // Optional if Authorization: Bearer is set
API token (optional when Authorization header is present).
Response Data
// undefined - 200
Content-Type: audio/mpeg (or audio/wav / audio/ogg depending on format)
<undefined>
// Responses may include headers with remaining balance and usage for this request.
// undefined
{
"code": string,
"message": string,
"requestId"?: string
}CURL Example
curl -X POST https://fishaudio.org/api/open/v2/speech/tts \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"voiceId": "00a1b221-6137-4b73-ad62-b0cbce134167",
"modelId": "fishaudio-s2pro",
"text": "Hello, world.",
"format": "wav",
"speed": 1,
"volume": 0
}' \
--output output.wavOnline Debug
Коды статуса
200: Success 400: Bad Request 401: Unauthorized 403: Forbidden 404: Not Found 429: Too Many Requests 500: Internal Server Error