服务和应用/推理服务相关接口
POSTInference Service APIs起始版本 5.1.8同步需要认证
添加模型服务
添加模型服务
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
请求参数
请求体字段
paramObject必填param 请求体结构
nameString必填资源名称
descriptionString资源的详细描述
yamlString必填yaml格式的配置文件
requestCpuInteger必填需要使用的cpu数量
requestMemoryLong必填需要使用的内存数量
zoneUuidString区域UUID
modelCenterUuidString必填暂无描述。
gpuComputeCapabilityString暂无描述。
installPathString必填安装路径。
systemBoolean系统。
startCommandString必填开始命令。
pythonVersionString暂无描述。
condaVersionString暂无描述。
typeString类型。
frameworkString暂无描述。
resourceUuidString资源UUID
tagUuidsList标签UUID列表
sourceString来源信息。
modelUuidsList模型UUID。
architectureImagesList暂无描述。
supportDistributedBoolean暂无描述。
containerCommandString容器启动命令。
containerArgsString容器启动参数。
vendorToSpecUuidsMapMapGPU厂商到GPU规格UUID列表的映射。
systemTagsList系统标签
userTagsList用户标签
响应状态
请求地址
POST/zstack/v1/ai/model-services
/zstack/v1/ai/model-services
请求示例
curl -X POST 'http://{host}/zstack/v1/ai/model-services' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"param":{"name":"<name>","description":"<description>","yaml":"<yaml>","requestCpu":1,"requestMemory":1,"zoneUuid":"<zoneUuid>","modelCenterUuid":"<modelCenterUuid>","gpuComputeCapability":"<gpuComputeCapability>","installPath":"<installPath>","system":true,"startCommand":"<startCommand>","pythonVersion":"<pythonVersion>","condaVersion":"<condaVersion>","type":"<type>","framework":"<framework>","resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"],"source":"<source>","modelUuids":["<modelUuids>"],"architectureImages":["<architectureImages>"],"supportDistributed":true,"containerCommand":"<containerCommand>","containerArgs":"<containerArgs>","vendorToSpecUuidsMap":{}},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
响应示例
200{ "inventory": { "name": "text to text model service", "description": "This is text to text model service you can chose model", "yaml": "model service parameters", "requestCpu": 4, "requestMemory": 1024 } }变更历史
此 API 暂无变更历史记录。
