注册模型
POST 注册模型
POST /openapi/v1/registry-model
使用接口前,请看本地模型接入->概述的接口调用方式 一个学校可以注册多个模型,注册成功的模型可在后台切换
Body 请求参数
{
"modelName": "deepseek-V3",
"registryUrl": "http://test.com/path",
"apiKey": "test",
"reqParams": [
"param1",
"param2"
],
"reqExample": "2121",
"resExample": ""
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
|---|---|---|---|---|---|
| Authorization | header | string | 是 | none | |
| X-ENV | header | string | 是 | 通过appid和appsecret获取的env | |
| body | body | object | 否 | none | |
| » modelName | body | string | 是 | 模型名称 | 同账号下不可重复 |
| » registryUrl | body | string | 是 | 模型接口注册地址 | none |
| » apiKey | body | string | 是 | 模型接口调用密钥 | none |
| » reqParams | body | [string] | 否 | 请求参数列表 | 预留字段,暂不支持,可扩展自定义接口注册,列出请求所注册接口的请求参数 |
| » reqExample | body | string | 否 | 请求示例 | 预留字段,暂不支持,可扩展自定义接口注册,给出一个注册接口请求的具体示例, curl请求为佳 |
| » resExample | body | string | 否 | 响应示例 | 预留字段,暂不支持,可扩展自定义接口注册,给出一个注册接口实际请求的返回数据 |
返回示例
{
"code": 0,
"data": {
"modelName": "测试",
"registryUrl": "http://pqimg.ie/ryxsu",
"apiKey": "test",
"modelId": "21421321"
},
"message": "OK"
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | 返回状态码 | none |
| » data | object | true | none | none | |
| »» modelName | string | true | none | 模型名称 | none |
| »» registryUrl | string | true | none | 模型接口注册地址 | none |
| »» apiKey | string | true | none | 模型接口调用密钥 | none |
| »» modelId | string | true | none | 模型唯一id | none |
| »» createTime | integer | true | none | 创建时间 | 13位时间戳 |
| »» updateTime | integer | true | none | 更新时间 | 13位时间戳 |
| » message | string | true | none | 返回信息 | none |