AI模型接口音频
原生Gemini格式
Gemini 音频生成接口。 可使用gemini-2.5-flash-preview-tts等模型
Authorization
BearerAuth
AuthorizationBearer <token>
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
model*string
模型名称
Request Body
application/json
contents*
generationConfig*
Response Body
application/json
curl -X POST "https://loading/v1beta/models/string:generateContent" \ -H "Content-Type: application/json" \ -d '{ "contents": [ { "parts": [ { "text": "Say cheerfully: Have a wonderful day!" } ] } ], "generationConfig": { "responseModalities": [ "AUDIO" ], "speechConfig": { "voiceConfig": { "prebuiltVoiceConfig": { "voiceName": "Kore" } } } } }'{
"candidates": [
{
"content": {
"role": "string",
"parts": [
{}
]
},
"finishReason": "string",
"safetyRatings": [
{}
]
}
],
"usageMetadata": {
"promptTokenCount": 0,
"candidatesTokenCount": 0,
"totalTokenCount": 0
}
}这篇文档对您有帮助吗?
最后更新于