All Products
Search
Document Center

Platform For AI:UpdateModelVersion

Last Updated:Oct 17, 2025

Updates a model version.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

paimodel:UpdateModelVersion

update

*All Resource

*

None None

Request syntax

PUT /api/v1/models/{ModelId}/versions/{VersionName} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

ModelId

string

Yes

The model ID. For more information about how to obtain the model ID, see ListModels.

model-dfs1****5c

VersionName

string

Yes

The model version.

0.1.0

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

VersionDescription

string

No

The description of the model version.

通用情感分析。

Metrics

object

No

The model metrics. The length cannot exceed 8,192 characters after serialization.

{ "Results": [{ "Dataset": { "DatasetId": "d-sdkjanksaklerhfd" }, "Metrics": { "cer": 0.175 } }, { "Dataset": { "Uri": "oss://xxxx/" }, "Metrics": { "cer": 0.172 } }] }

TrainingSpec

object

No

The training configuration. This is used for fine-tuning and incremental training.

{}

InferenceSpec

object

No

Describes how to apply the model to downstream inference applications. For example, describe the processor and container for Elastic Algorithm Service (EAS). Example: { "processor": "tensorflow_gpu_1.12" }.

{ "processor": "tensorflow_gpu_1.12" }

Options

string

No

The extended field. This field is a JSON string.

{}

SourceType

string

No

The source type of the model. Valid values:

  • Custom (default): The model is a custom model.

  • PAIFlow: The model is from a PAI pipeline.

  • TrainingService: The model is from a PAI training service.

Valid values:

  • PAIFlow :

    PAIFlow

  • Custom :

    Custom

  • TrainingService :

    TrainingService

PAIFlow

SourceId

string

No

The source ID.

  • If the source type is Custom, this field has no restrictions.

  • If the source is PAIFlow or TrainingService, the format is as follows:

region=<region_id>,workspaceId=<workspace_id>,kind=<kind>,id=<id>

The parameters are described as follows:

  • region: the Alibaba Cloud region ID.

  • workspaceId: the workspace ID.

  • kind: the type. Valid values: PipelineRun (PAI pipeline) or ServiceJob (training service).

  • id: the unique identifier.

region=cn-shanghai,workspaceId=13**,kind=PipelineRun,id=run-sakdb****jdf

ApprovalStatus

string

No

The approval status. Valid values:

  • Pending: The model is pending approval.

  • Approved: The model is approved to be published.

  • Rejected: The model is not approved to be published.

Approved

EvaluationSpec

object

No

The evaluation configuration.

{}

CompressionSpec

object

No

The compression configuration.

{}

ExtraInfo

object

No

Other information.

{ "CoverUris": ["https://e***u.oss-cn-hangzhou.aliyuncs.com/st****017.preview.png"], "TrainedWords": ["albedo_overlord"] }

DistillationSpec

object

No

The distillation configuration.

{}

Response elements

Element

Type

Description

Example

object

The response body.

RequestId

string

The request ID.

D5BFFEE3-6025-443F-8A03-02D61***C4B9

Examples

Success response

JSON format

{
  "RequestId": "D5BFFEE3-6025-443F-8A03-02D61***C4B9"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.