Skip to content
登录/注册

创建会话

POST
/chat/completions

支持ChatGPT,Claude,Gemini,DeepSeek等多个AI模型,只需调用一个接口,传入不同模型参数,即可对接国际主流模型。

Request Body

application/json
JSON
{
  
"model": "gpt-4o",
  
"messages": [
  
  
{
  
  
  
"role": "user",
  
  
  
"content": "你好,请介绍一下你自己"
  
  
}
  
],
  
"stream": false
}

Responses

聊天补全响应

application/json
JSON
{
  
"id": "string",
  
"object": "chat.completion",
  
"created": 0,
  
"model": "string",
  
"choices": [
  
  
{
  
  
  
"index": 0,
  
  
  
"message": {
  
  
  
  
"role": "assistant",
  
  
  
  
"content": "Hello! How can I assist you today?"
  
  
  
},
  
  
  
"finish_reason": "string"
  
  
}
  
],
  
"usage": {
  
  
"prompt_tokens": 0,
  
  
"completion_tokens": 0,
  
  
"total_tokens": 0
  
}
}

Playground

Server
Body

Samples

Powered by VitePress OpenAPI