Request
Body Params application/json
{
"text": "生活就像海洋,只有意志坚强的人才能到达彼岸",
"provider": "openai",
"voice": "alloy"
}
Request Code Samples
curl --location --request POST 'https://api.302.ai/302/tts/generate' \
--header 'Authorization: Bearer sk-mfYQzy0XTFfz4P16vRE4gFrKK1Nly4TozsMqbbb9PSiJUvFO' \
--header 'Content-Type: application/json' \
--data-raw '{
"text": "生活就像海洋,只有意志坚强的人才能到达彼岸",
"provider": "openai",
"voice": "alloy"
}'
Responses
application/json {
"audio_url": "string",
"data": {},
"error": {}
}
Modified at 2025-07-29 02:22:47