服务和应用/推理服务相关接口
POSTInference Service APIs起始版本 5.3.20同步需要认证
克隆模型服务
克隆模型服务
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
路径参数
请求参数
路径参数
uuidString必填资源的UUID,唯一标示该资源
请求体字段
nameString资源名称。
descriptionString资源的详细描述。
readmeString文档模型服务。
sizelong返回记录数。
gpuComputeCapabilityString暂无描述。
响应状态
请求地址
POST/zstack/v1/ai/model-services/{uuid}
/zstack/v1/ai/model-services/{uuid}
请求示例
curl -X POST 'http://{host}/zstack/v1/ai/model-services/{uuid}' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"name":"<name>","description":"<description>","readme":"<readme>","size":1,"gpuComputeCapability":"<gpuComputeCapability>","installPath":"<installPath>","startCommand":"<startCommand>","pythonVersion":"<pythonVersion>","condaVersion":"<condaVersion>","system":true,"type":"<type>","yaml":"<yaml>","source":"<source>","framework":"<framework>","requestCpu":1,"requestMemory":1,"resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"],"systemTags":["<systemTags>"],"userTags":["<userTags>"],"cpuArchitectures":["<cpuArchitectures>"],"architectureImages":["<architectureImages>"],"supportDistributed":true,"params":{"containerCommand":"<containerCommand>","containerArgs":"<containerArgs>","vendorToSpecUuidsMap":{}}}'
响应示例
200{ "inventory": { "uuid": "90d425a802ff44eeb530f21587633700", "name": "example", "description": "Example description for modelService", "yaml": "services:\n - ports:\n - 3000\n name: qwen1.5-7b-chat:2b34xhrmqwhomjkd\n livez: /livez\n readyz: /readyz\n serviceBootupTime: 30\nenv:\n - key:value\n - key:value\ndistro:\n packages: vim,nfs-utils\npython:\n requirements_txt: ./requirements.txt\n index_url: https://pypi.tuna.tsinghua.edu.cn/simple\n trusted_host: pypi.tuna.tsinghua.edu.cn\n", "requestCpu": 1, "requestMemory": 1024, "modelCenterUuid": "432c5fdd49374bb0a2fd7877f0a877cf", "type": "Endpoint", "system": true, "gpuComputeCapability": "3.7", "installPath": "/example/install/path", "pythonVersion": "3.8.10", "condaVersion": "23.7.4", "startCommand": "python3 app.py", "supportDistributed": true, "modelServiceImages": [ { "uuid": "c13336388d574fec824752525ae05a21", "modelServiceUuid": "90d425a802ff44eeb530f21587633700", "cpuArchitecture": "x86_64", "vmImageUuid": "b31bc4574f22426a89902edac5d14a72", "dockerImage": "registry.example.com/x86_64/myimage:latest", "createDate": "Nov 25, 2025 11:51:50 AM", "lastOpDate": "Nov 25, 2025 11:51:50 AM" }, { "uuid": "46c0e4bb46e849059e6d6bc8881d86f3", "modelServiceUuid": "90d425a802ff44eeb530f21587633700", "cpuArchitecture": "aarch64", "vmImageUuid": "b2085e2ac2d84029a7947cb09178daaa", "dockerImage": "registry.example.com/aarch64/myimage:latest", "createDate": "Nov 25, 2025 11:51:50 AM", "lastOpDate": "Nov 25, 2025 11:51:50 AM" } ], "createDate": "Nov 25, 2025 11:51:50 AM", "lastOpDate": "Nov 25, 2025 11:51:50 AM" } }变更历史
此 API 暂无变更历史记录。
