Skip to main content
Model Repository/Model APIs
PUTModel APIsSince 5.1.8SynchronousAuth Required

UpdateModel

UpdateModel

Execution Availability

Try It Out

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

Path Parameters

Request Inputs

Path Parameters

  • uuidStringRequired

    The resource UUID.

Body Fields

  • nameString

    Optional. The resource name.

  • installPathString

    Optional. The URL where the model is stored.

  • descriptionString

    Optional. The detailed description of the resource.

  • vendorString

    Optional.

  • parametersString

    Optional. The detailed parameters of the model.

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    The result of updating the model.

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventoryModelInventoryRequired

    See inventory.

    • uuidStringRequired

      The resource UUID.

    • nameStringRequired

      The resource name.

    • descriptionStringRequired

      The resource description.

    • installPathStringRequired

      The model installation path.

    • parametersStringRequired

      The model parameters.

    • modelCenterUuidStringRequired

      The model center UUID.

    • logoStringRequired

      The model logo.

    • vendorStringRequired

      The model vendor.

    • modelIdStringRequired

      The model ID.

    • introductionStringRequired

      The model introduction.

    • sizeLongRequired

      The model size.

    • versionStringRequired

      The model version.

    • typeStringRequired

      The model type.

    • minGpuMemoryLongRequired

      The minimum GPU memory.

    • recommendedGpuMemoryLongRequired

      The recommended GPU memory.

    • recommendedGpuNumListRequired

      The recommended number of GPUs.

    • gpuConstraintDescriptionStringRequired

      The GPU constraint description.

    • versionSemverStringRequired

      The semantic version.

    • isLatestVersionBooleanRequired

      Whether the model is the latest version.

    • artifactChecksumStringRequired

      The artifact checksum.

    • artifactSizeBytesLongRequired

      The artifact size in bytes.

    • architectureTypeStringRequired

      The model architecture type.

    • frameworkVersionStringRequired

      The framework version.

    • requiredAcceleratorStringRequired

      The required accelerator.

    • pipelineTagStringRequired

      The pipeline tag.

    • modelServiceRefsListRequired

      The bindings between the model and model services.

    • extraGpuMemRequestLongRequired

      The extra GPU memory request.

    • SAMPLE_SIZEIntegerRequired

      The sample size.

    • createDateTimestampRequired

      The creation time.

    • lastOpDateTimestampRequired

      The last operation time.

Endpoint

PUT/zstack/v1/ai/models/{uuid}

/zstack/v1/ai/models/{uuid}

Operation ID

UpdateModel

Permalink

Request Example

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>"]}'

Response Example

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 } }

Change History

This API has no change history records yet.

View all change history