AgentDelete - 删除机器人
更新时间:2025-12-26
API访问域名
| 请求方式 | POST |
|---|---|
| base url | https://keyue.cloud.baidu.com |
| 后缀接口 | /open/v1/api/v3/agents/delete |
| Authentication | token为API Key |
说明
机器人必须存在才能删除,已经上线的agent也不能删除,只能删除下线的agent
请求参数
Header参数
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| Content-Type | string | 是 | 内容类型 | 固定值:application/json |
| token | string | 是 | API KEY | 机器人API KEY。 详细获取方式参考:准备工作 |
| uid | string | 是 | 用户ID | 详细获取方式参考:准备工作 |
| username | string | 是 | 用户名 | 详细获取方式参考:准备工作 |
Parameter参数
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| agentId | string | 是 | AI agent的ID |
Body参数
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| agentName | string | 是 | agent名称 | |
| id | string | 是 | AI agent的ID |
响应参数
| 名称 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|
| time | integer | 是 | 时间 | 1722239381781 |
| data | null | 是 | 数据 | null |
| code | integer | 是 | 状态码 | 200 |
| msg | string | 是 | 状态信息 | OK |
请求示例
Bash
1curl --location --request POST 'https://keyue.cloud.baidu.com/open/v1/api/v3/agents/delete?agentId=xxxx' \
2--header 'token: xxxx' \
3--header 'uid: xxxx' \
4--header 'username: xxxxxxxx' \
5--header 'Content-Type: application/json' \
6--data '{
7 "agentName": "test",
8 "id": "xxxx"
9}'
响应示例
1{
2 "time": 1722239381781,
3 "data": null,
4 "code": 200,
5 "msg": "OK"
6}
1{
2 "msg": "机器人不存在,请刷新页面重试",
3 "tip": "",
4 "code": 4000604,
5 "requestId": "054c3f38c02e467d90c5f914a95495a8"
6}
7{
8 "msg": "机器人当前状态不可删除",
9 "tip": "",
10 "code": 4007281,
11 "requestId": "326d90296b3e483691caf99efd672ad1"
12}
评价此篇文章
