Documentation et débogage API
Texte en parole
Clonage de voix
Synchronisation labiale
Autres
Texte en parole
Clonage de voix
Synchronisation labiale
Autres
Texte en parole (HTTP)
Testez l’API TTS via HTTP.
API Texte en parole
Endpoint
POST /api/open/tts
En-têtes de requête
// undefined Content-Type: application/json Authorization: Bearer YOUR_API_TOKEN // Clé API // undefined Content-Type: application/msgpack Authorization: Bearer YOUR_API_TOKEN // Clé API
Paramètres de requête
Paramètres de requête d’exemple
Version Notes:
- • Legacy Versions: v1, v2, s1 (basic text-to-speech functionality)
- • V3 Versions: v3-turbo, v3-hd (advanced features including emotion control and language boost)
- • The system will automatically select the corresponding version based on model configuration, no manual specification needed
Réponse
// undefined (cache=false) - 200
Content-Type: audio/mpeg
<undefined>
// undefined (cache=true) - 200
Content-Type: application/json
{
"success": boolean, // undefined
"audio_url": string, // undefined
"format": string, // undefined
"characters_used": number, // undefined
"quota_remaining": number // undefined
}
// undefined
{
"error": string // undefined
}Exemple CURL
# undefined - undefined
curl -X POST https://fishaudio.net/api/open/tts \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"reference_id": "your_model_id",
"text": "undefined",
"speed": 1.0,
"volume": 0,
"version": "s1",
"format": "mp3",
"cache": false
}' \
--output output.mp3
# undefined - undefined
curl -X POST https://fishaudio.net/api/open/tts \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"reference_id": "your_model_id",
"text": "undefined",
"speed": 1.0,
"volume": 0,
"version": "v3-hd",
"emotion": "calm",
"language": "zh",
"format": "mp3",
"cache": false
}' \
--output output.mp3
# undefined (undefined)Debug en ligne
Codes de statut
200: Success 400: Bad Request 401: Unauthorized 403: Forbidden 404: Not Found 429: Too Many Requests 500: Internal Server Error