Skip to main content
Service and Application/Inference Template APIs
POSTInference Template APIsSince 5.4.0SynchronousAuth Required

MatchModelServiceTemplateWithModel

MatchModelServiceTemplateWithModel

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • paramObjectRequired

    param request body object.

    • modelUuidsListRequired

      模型UUID。

    • modelServiceUuidsListRequired

      模型服务UUID。

    • uuidString

      Optional. The resource UUID.

    • descriptionString

      Optional. The detailed description of the resource.

    • modelUuidString

      模型UUID。

    • zoneUuidStringRequired

      The zone UUID.

    • vmImageUuidString

      云主机镜像UUID。

    • primaryStorageUuidString

      Optional. The primary storage UUID.

    • datasetUuidsList

      数据集UUID。

    • modelServiceGroupUuidsList

      模型服务组UUID。

    • dockerImageString

      docker镜像。

    • cpuNumInteger

      No description provided.

    • nameStringRequired

      The resource name.

    • environmentVariablesMap

      环境变量。

    • startupParametersMap

      No description provided.

    • typeStringRequired

      类型。

    • clusterUuidString

      Optional. The cluster UUID.

    • memorySizeLong

      内存大小。

    • l3NetworkUuidsList

      No description provided.

    • serviceBootUptimeInteger

      No description provided.

    • rootDiskOfferingUuidString

      No description provided.

    • rootDiskSizeLong

      根磁盘大小。

    • resourceUuidString

      Optional. The resource UUID.

    • tagUuidsList

      Optional. The tag UUID list.

    • instanceNumberIntegerRequired

      The instance number.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

  • requestCpuNumInteger

    Optional. The requested CPU count.

  • requestMemorySizeLong

    Optional. The requested memory size.

Responses

200 OK

On success, this API returns the following response structure.

  • successBooleanRequired

    Whether the operation succeeded.

  • errorErrorCodeRequired

    The error code. This field is null when the operation succeeds.

  • resultMapRequired

    The match result between models and model service templates.

Endpoint

POST/zstack/v1/ai/model-services/templates

/zstack/v1/ai/model-services/templates

Operation ID

MatchModelServiceTemplateWithModel

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/ai/model-services/templates' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"param":{"modelUuids":["<modelUuids>"],"modelServiceUuids":["<modelServiceUuids>"],"uuid":"<uuid>","description":"<description>","modelUuid":"<modelUuid>","zoneUuid":"<zoneUuid>","vmImageUuid":"<vmImageUuid>","primaryStorageUuid":"<primaryStorageUuid>","datasetUuids":["<datasetUuids>"],"modelServiceGroupUuids":["<modelServiceGroupUuids>"],"dockerImage":"<dockerImage>","cpuNum":1,"name":"<name>","environmentVariables":{},"startupParameters":{},"type":"<type>","clusterUuid":"<clusterUuid>","memorySize":1,"l3NetworkUuids":["<l3NetworkUuids>"],"serviceBootUptime":1,"rootDiskOfferingUuid":"<rootDiskOfferingUuid>","rootDiskSize":1,"resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"],"instanceNumber":1},"systemTags":["<systemTags>"],"userTags":["<userTags>"],"requestCpuNum":1,"requestMemorySize":1,"serviceLivez":"<serviceLivez>","serviceReadyz":"<serviceReadyz>","projectUuid":"<projectUuid>"}'

Response Example

200
{ "result": { "modelUuid": { "modelServiceUuid": [ { "status": "Matched", "name": "CpuArchitecture", "fieldName": "cpuArchitecture", "fieldValue": "X86_64", "comments": "matched" } ] } } }

Change History

This API has no change history records yet.

View all change history