跳转到主要内容
POST
POST /v1beta/models/{model}:streamGenerateContent

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

路径参数

model
string
必填

查询参数

alt
enum<string>
可用选项:
sse,
json

请求体

application/json
contents
object[]
必填
cachedContent
string | null
continuationToken
string | null

Opaque token from a previous hop; contents must match the original request.

generationConfig
object | null
labels
object | null
safetySettings
object[] | null
serviceTier
enum<string> | null
可用选项:
unspecified,
standard,
flex,
priority
store
boolean | null
systemInstruction
object | null
toolConfig
object | null
tools
object[] | null

响应

Successful protocol response

candidates
object[] | null
error
object | null

A Google API error can arrive as a record inside a successful HTTP stream.

modelStatus
object | null
modelVersion
string | null
promptFeedback
object | null
responseId
string | null
usageMetadata
object | null