- 后台接口
- 前台接口
- 【新】后台接口
- AI设置
- AI知识库
- 模型计费(旧)
- 模型管理
- 对话管理
- 创作管理
- 充值套餐
- 注册奖励
- 用户管理
- 用户分组
- 财务中心
- 其它接口
- 系统设置
- AI音乐
- AI搜索
- AIPPT
- 会员套餐
- 思维导图
- AI视频
- 分享设置
- 空间设置
- 任务分享记录
- AI绘画
- 广场分类
- 【新】前台接口
密钥新增
开发中
POST
/adminapi/setting.keyPool/add
2、对话模型和向量模型需要传递model_id参数,其它的则不需要
请求参数
Header 参数
token
string
可选
示例值:
{{admin-token}}
Body 参数application/json
type
integer
必需
model_id
integer
必需
channel
string
必需
key
string
Key
appid
string
AppID
secret
string
Secret
status
integer
必需
示例
{
"type": 9,
"model_id": 1,
"channel": "openai",
"key": "111",
"appid": "",
"secret": "",
"status": 1
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/adminapi/setting.keyPool/add' \
--header 'token: {{admin-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": 9,
"model_id": 1,
"channel": "openai",
"key": "111",
"appid": "",
"secret": "",
"status": 1
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
show
integer
必需
msg
string
必需
data
array[string]
必需
示例
{
"code": 1,
"show": 0,
"msg": "添加成功",
"data": []
}
修改于 2024-09-29 02:19:13