跳转至

创建会话

创建Agent会话接口

请求URL

POST /api/v1/conversation/create

请求参数

参数 取值 说明
Content-Type application/json 解释请求正文的方式
X-TraceId string traceId

Body

参数名称 类型 是否必选 参数说明 备注
agent_id string 智能体(应用)id
env_type string 环境类型 "open_platform" 开放平台

请求示例

{
    "agent_id": "agent_1234567890",
    "env_type": "open_platform"
}

响应参数

参数id 参数名 类型 描述 备注
code 错误码 int 0代表正常
msg 错误消息 string
conversation_id 会话id string

响应示例

{
    "code": 0,
    "msg": "success",
    "conversation_id": "conv_0987654321"
}