跳转到主要内容
POST
创建 Chat Completion
使用支持 Chat Completions 协议的模型。设置 stream: true 可获得 SSE 响应。

其他支持的模型

  • openai/gpt-6-astra
  • anthropic/claude-fable-5.1
  • xai/grok-4.6
  • google/gemini-3.7-flash
  • google/gemini-3.5-flash
  • anthropic/claude-opus-4.8
  • openai/gpt-5.5
  • openai/gpt-5.4
  • openai/gpt-5.2
  • anthropic/claude-sonnet-4.6
  • anthropic/claude-opus-4.6
  • anthropic/claude-opus-5.5
  • anthropic/claude-sonnet-5.5
  • anthropic/claude-haiku-5.5
  • anthropic/claude-opus-4.7
  • anthropic/claude-opus-4.5
  • anthropic/claude-sonnet-4.5
  • anthropic/claude-haiku-4.5
  • openai/gpt-6.1-sol
  • openai/gpt-6.1-terra
  • openai/gpt-6-sol
  • openai/gpt-6-luna
  • google/gemini-3.8-flash
  • google/gemini-4-argon
  • google/gemini-3.1-pro-preview
  • google/gemini-3-flash-preview
  • deepseek/deepseek-v4-pro
  • deepseek/deepseek-v4-flash
  • deepseek/deepseek-v4.1-flash
  • x-ai/grok-4.7
在根级发送协议字段,不需要生成接口的 input 包装。messages 必须是非空数组。

授权

Authorization
string
header
必填

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

请求体

application/json
model
string
必填
示例:

"openai/gpt-6-astra"

messages
object[]
必填
Minimum array length: 1
stream
boolean
默认值:false

响应

Completion 或 SSE 流

The response is of type object.