创建模型
支持发布或导入基础模型及LoRA微调模型。
POST
https://api.alayanew.com/api/model/v1/create
Authorizations
Authorizations:StringHeaderRequired
用户可通过已获取Serverless API Key做验证,例如:plain Credential=[YOUR_AK],Signature=[YOUR_SK]。
Body
application/json
aidcId:StringRequired
智算中心ID。
modelSourcePath:StringRequired
模型源路径。
modelMeta:ObjectRequired
模型元数据信息。
modelMeta.name:String Required
模型名称。
modelMeta. description:String
模型描述。
modelType:StringRequired
模型类型(Base/LoRA)。
modelExtensions:Object
模型拓展字段。
Response
状态码:application/json
200
code:Int
code是一种常见的返回值形式,表示查询操作的执行结果。
0
-1
0是成功标识,表示操作成功完成。
data:object
data.id:String
模型ID。
cURL
Python
JavaScript
Go
Java
curl --location --request POST 'http://api.unite.zetyun.cn/api/model/v1/create'
--header 'Authorization: plain Credential=YOUR_AK,Signature=YOUR_SK'
--header 'Content-Type: application/json'
--data '
{
"aidcId": 2,
"modelSourcePath": "/capacity/userdata/vcacb50arkk4/Qwen2.5-7B-Instruct",
"modelMeta": {
"name": "test",
"description": "test"
},
"modelType": "base"
}
200
400
401
403
404
500
{
"code": 0,
"data": {
"id": "5df0ef3c-252a-44c8-aba3-a87e23615c76"
}
}