POST
Gemini文本聊天

授权

Authorization
string
header
必填

Use Authorization: Bearer <API_KEY>.

路径参数

model
string
必填

模型名称

请求体

application/json
contents
object[]
generationConfig
object
safetySettings
object[]
tools
object[]
systemInstruction
object

响应

200 - application/json

成功

candidates
object[]
usageMetadata
object