Skip to main content
创建 Anthropic Messages 响应

授权

Authorization
string
header
默认值:sk-your-api-key
必填

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

请求体

application/json
model
string
必填
max_tokens
integer
必填
必填范围: x >= 1
messages
object[]
必填
stream
boolean
默认值:false

响应

Anthropic Messages 响应。流式请求返回 text/event-stream 事件流。

id
string
type
string
示例:

"message"

role
string
示例:

"assistant"

content
object[]
usage
object