AI 模型接口音频(Audio)
原生Gemini格式
Gemini 音频生成接口。 可使用gemini-2.5-flash-preview-tts等模型
认证
BearerAuth AuthorizationBearer <token>
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
In: header
路径参数
model*string
模型名称
请求体
application/json
TypeScript 类型定义
在 TypeScript 中使用 request body 类型。
响应体
application/json
curl -X POST "https://example.com/v1beta/models/string:generateContent" \ -H "Content-Type: application/json" \ -d '{ "contents": [ {} ], "generationConfig": { "responseModalities": [ "string" ], "speechConfig": { "voiceConfig": { "prebuiltVoiceConfig": { "voiceName": "string" } } } } }'{ "candidates": [ { "content": { "role": "string", "parts": [ {} ] }, "finishReason": "string", "safetyRatings": [ {} ] } ], "usageMetadata": { "promptTokenCount": 0, "candidatesTokenCount": 0, "totalTokenCount": 0 }}