{
"contents": [
{
"role":"user",
"parts": [
{
"text": "Say cheerfully: Have a wonderful day!"
}
]
}
],
"generationConfig":{
"responseModalities": ["AUDIO"],
"speechConfig": {
"multiSpeakerVoiceConfig": {
"speakerVoiceConfigs": [
{
"speaker": "Dr. Anya",
"voiceConfig": {
"prebuiltVoiceConfig": {"voiceName": "Kore"}
}
},
{
"speaker": "Liam",
"voiceConfig": {
"prebuiltVoiceConfig": {"voiceName": "Puck"}
}
}
]
}
}
}
}
curl --location --request POST 'https://poloai.top/v1beta/models/gemini-2.5-pro-preview-tts:generateContent' \
--header 'Accept;' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"role":"user",
"parts": [
{
"text": "Say cheerfully: Have a wonderful day!"
}
]
}
],
"generationConfig":{
"responseModalities": ["AUDIO"],
"speechConfig": {
"multiSpeakerVoiceConfig": {
"speakerVoiceConfigs": [
{
"speaker": "Dr. Anya",
"voiceConfig": {
"prebuiltVoiceConfig": {"voiceName": "Kore"}
}
},
{
"speaker": "Liam",
"voiceConfig": {
"prebuiltVoiceConfig": {"voiceName": "Puck"}
}
}
]
}
}
}
}'
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"inlineData": {
"mimeType": "audio/L16;codec=pcm;rate=24000",
"data": "+f/3//r/........"
}
}
]
},
"finishReason": "STOP",
"index": 0,
"safetyRatings": null
}
],
"promptFeedback": {
"safetyRatings": null
},
"usageMetadata": {
"promptTokenCount": 9,
"candidatesTokenCount": 44,
"totalTokenCount": 53,
"thoughtsTokenCount": 0,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 9
}
]
}
}