Skip to main content
创建对话补全

授权

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
必填
示例:

"gpt-4o-mini"

messages
object[]
必填
temperature
number
必填范围: 0 <= x <= 2
stream
boolean
默认值:false
tools
object[]

响应

对话补全响应。流式请求返回 text/event-stream 事件流。

id
string
object
string
示例:

"chat.completion"

choices
object[]
usage
object