Skip to main content

注册模型

POST 注册模型

POST /openapi/v1/registry-model

使用接口前,请看本地模型接入->概述的接口调用方式 一个学校可以注册多个模型,注册成功的模型可在后台切换

Body 请求参数

{
"modelName": "deepseek-V3",
"registryUrl": "http://test.com/path",
"apiKey": "test",
"reqParams": [
"param1",
"param2"
],
"reqExample": "2121",
"resExample": ""
}

请求参数

名称位置类型必选中文名说明
Authorizationheaderstringnone
X-ENVheaderstring通过appid和appsecret获取的env
bodybodyobjectnone
» modelNamebodystring模型名称同账号下不可重复
» registryUrlbodystring模型接口注册地址none
» apiKeybodystring模型接口调用密钥none
» reqParamsbody[string]请求参数列表预留字段,暂不支持,可扩展自定义接口注册,列出请求所注册接口的请求参数
» reqExamplebodystring请求示例预留字段,暂不支持,可扩展自定义接口注册,给出一个注册接口请求的具体示例, curl请求为佳
» resExamplebodystring响应示例预留字段,暂不支持,可扩展自定义接口注册,给出一个注册接口实际请求的返回数据

返回示例

{
"code": 0,
"data": {
"modelName": "测试",
"registryUrl": "http://pqimg.ie/ryxsu",
"apiKey": "test",
"modelId": "21421321"
},
"message": "OK"
}

返回结果

状态码状态码含义说明数据模型
200OKnoneInline

返回数据结构

状态码 200

名称类型必选约束中文名说明
» codeintegertruenone返回状态码none
» dataobjecttruenonenone
»» modelNamestringtruenone模型名称none
»» registryUrlstringtruenone模型接口注册地址none
»» apiKeystringtruenone模型接口调用密钥none
»» modelIdstringtruenone模型唯一idnone
»» createTimeintegertruenone创建时间13位时间戳
»» updateTimeintegertruenone更新时间13位时间戳
» messagestringtruenone返回信息none