v1

latestOpenAPI 3.1.02026-07-17282666.2 KB
聊天

Get Chat

聊天API(仅支持API Key认证)

此端点专门为API Key用户设计,提供稳定的聊天服务。 用户需要先登录获取JWT令牌,然后使用JWT创建API Key,最后使用API Key访问此接口。

post/api/v1/chat

Headers

agentstring required

指定智能体名称。也支持 'Agent'/'x-agent' 变体。示例: fastgpt

Request body

querystring required

用户输入的对话内容,所有Agent必填

userstring nullable

用户标识

uidstring nullable

用户ID

streamboolean nullable

是否流式返回

app_idstring nullable

应用ID

chat_idstring nullable

会话ID

conversation_idstring nullable

会话标识,用于多轮对话

detailboolean nullable

是否返回详细信息(模块状态等)

Response

Successful Response

idstring nullable

会话ID

modelstring nullable

使用的模型名称

newVariablesobject nullable

新变量