跳到主要内容

创建模型

支持发布或导入基础模型及LoRA微调模型。
POST
https://api.alayanew.com/api/model/v1/create
Authorizations
AuthorizationsStringHeaderRequired

用户可通过已获取Serverless API Key做验证,例如:plain Credential=[YOUR_AK],Signature=[YOUR_SK]。

Body
application/json
aidcIdStringRequired

智算中心ID。

modelSourcePathStringRequired

模型源路径。

modelMetaObjectRequired

模型元数据信息。

modelMeta.nameString Required

模型名称。

modelMeta. descriptionString

模型描述。

modelTypeStringRequired

模型类型(Base/LoRA)。

modelExtensionsObject

模型拓展字段。

Response
状态码:application/json
codeInt

code是一种常见的返回值形式,表示查询操作的执行结果。

0是成功标识,表示操作成功完成。
dataobject

data.idString

模型ID。


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"
        }
{
    "code": 0,
    "data": {
        "id": "5df0ef3c-252a-44c8-aba3-a87e23615c76"
    }
}