Skip to main content
POST
Create chat completion
使用 OpenAI 兼容请求体发起多轮对话、文本生成、代码生成或推理任务。

Authorizations

Authorization
string
header
required

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

Body

application/json
model
string
required

Model name available in your AIOAGI account.

messages
object[]
required
temperature
number
default:1
Required range: 0 <= x <= 2
max_tokens
integer
Required range: x >= 1
stream
boolean
default:false

Response

Chat completion response

id
string
object
string
Example:

"chat.completion"

created
integer
model
string
choices
object[]
usage
object