模型仓库/模型相关接口
PUTModel APIs起始版本 5.1.8同步需要认证
修改模型
修改模型
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
路径参数
请求参数
路径参数
uuidString必填资源的UUID,唯一标示该资源
请求体字段
nameString资源名称
installPathString模型存储的url
descriptionString资源的详细描述
vendorString可选。
parametersString模型的详细参数
响应状态
请求地址
PUT/zstack/v1/ai/models/{uuid}
/zstack/v1/ai/models/{uuid}
请求示例
curl -X PUT 'http://{host}/zstack/v1/ai/models/{uuid}' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"name":"<name>","installPath":"<installPath>","description":"<description>","vendor":"<vendor>","parameters":"<parameters>","modelCenterUuid":"<modelCenterUuid>","modelClassifications":["<modelClassifications>"],"recommendedGpuNum":"<recommendedGpuNum>","gpuConstraintDescription":"<gpuConstraintDescription>","modelId":"<modelId>","defaultModelServiceUuid":"<defaultModelServiceUuid>","clearDefaultModelService":true,"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
响应示例
200{ "inventory": { "uuid": "1bb3ef7d600d4d30b21b8ffd299c37b5", "name": "example", "description": "test model", "installPath": "/usr/local/test-model", "parameters": "test parameters", "modelCenterUuid": "ebf96ce1de2c46fa8af9d503c29bb93d", "logo": "BASE64data", "vendor": "ZStack", "modelId": "test-model-id", "introduction": "This is a md5 format string", "size": 1024000, "version": "CustomizeVersion", "type": "System", "minGpuMemory": 4295991296, "recommendedGpuMemory": 4295991296, "versionSemver": "1.0.0", "isLatestVersion": true, "artifactChecksum": "This is a sha256 format string", "artifactSizeBytes": 1024000, "architectureType": "Qwen3MoeForCausalLM", "frameworkVersion": "PyTorch 2.0.1+cu118", "requiredAccelerator": "cuda:12.1", "extraGpuMemRequest": 4294967296, "SAMPLE_SIZE": 1000 } }变更历史
此 API 暂无变更历史记录。
