All Products
Search
Document Center

Platform For AI:GetModelVersion

Last Updated:Oct 17, 2025

Retrieves 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:GetModelVersion

get

*All Resource

*

None None

Request syntax

GET /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-rbvg5wzljz****ks92

VersionName

string

Yes

The model version.

1.0.1

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

The response body.

RequestId

string

The request ID.

5A14FA81-DD4E-******-6343FE44B941

GmtCreateTime

string

The UTC time when the model was created. The time is in the ISO 8601 format.

2021-01-30T12:51:33.028Z

GmtModifiedTime

string

The UTC time when the model was last updated. The time is in the ISO 8601 format.

2021-01-30T12:51:33.028Z

UserId

string

The user ID.

1234567890******

OwnerId

string

The ID of the Alibaba Cloud account.

1234567890******

Uri

string

The URI of the model version. This is the storage location of the model. Valid values:

  • The HTTP or HTTPS URL of the model. Example: https://myweb.com/mymodel.tar.gz.

  • If the model is stored in Object Storage Service (OSS), the format is oss://<bucket>.<endpoint>/object. For more information about how to configure the endpoint, see Endpoints. Example: oss://mybucket.oss-cn-beijing.aliyuncs.com/mypath/.

oss://t***.cn-beijing.oss.aliyuncs.com/mod**/

Labels

array

The list of labels for the model version.

Label

The label.

Options

string

The extended field. This field is a JSON string.

{}

VersionName

string

The model version.

0.1.0

VersionDescription

string

The description of the model version.

通用情感分析。

TrainingSpec

object

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

{}

InferenceSpec

object

Describes how to apply the model to a downstream inference service. For example, this can describe the processor and container for Elastic Algorithm Service (EAS).

{ "Processor": "tensorflow_gpu_1.12" }

FormatType

string

The model format. Valid values:

  • OfflineModel

  • SavedModel

  • Keras H5

  • Frozen Pb

  • Caffe Prototxt

  • TorchScript

  • XGBoost

  • PMML

  • AlinkModel

  • ONNX

Valid values:

  • OfflineModel :

    OfflineModel

  • SavedModel :

    SavedModel

  • Keras H5 :

    Keras H5

  • Frozen Pb :

    Frozen Pb

  • Caffe Prototxt :

    Caffe Prototxt

  • TorchScript :

    TorchScript

  • XGBoost :

    XGBoost

  • PMML :

    PMML

  • AlinkModel :

    AlinkModel

  • ONNX :

    ONNX

SavedModel

FrameworkType

string

The model framework. Valid values:

  • Pytorch -XGBoost

  • Keras

  • Caffe

  • Alink

  • Xflow

  • TensorFlow

Valid values:

  • Pytorch :

    Pytorch

  • XGBoost :

    XGBoost

  • Keras :

    Keras

  • Caffe :

    Caffe

  • Alink :

    Alink

  • Xflow :

    Xflow

  • TensorFlow :

    TensorFlow

TensorFlow

SourceType

string

The source type of the model. Valid values:

  • Custom: 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

The source ID.

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

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

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

The parameters are:

  • region: The ID of the Alibaba Cloud region.

  • workspaceId: The workspace ID.

  • kind: The type. Valid values: PipelineRun (PAI pipeline) and ServiceJob (training service).

  • id: The unique identifier.

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

ApprovalStatus

string

The approval status. Valid values:

  • Pending: The model is pending approval.

  • Approved: The model is approved for publishing.

  • Rejected: The model is rejected for publishing.

Approved

EvaluationSpec

object

The evaluation configuration.

{}

CompressionSpec

object

The compression configuration.

{}

ExtraInfo

object

Other information.

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

Metrics

object

The metrics.

{}

DistillationSpec

object

The distillation configuration.

{}

Examples

Success response

JSON format

{
  "RequestId": "5A14FA81-DD4E-******-6343FE44B941",
  "GmtCreateTime": "2021-01-30T12:51:33.028Z",
  "GmtModifiedTime": "2021-01-30T12:51:33.028Z",
  "UserId": "1234567890******",
  "OwnerId": "1234567890******",
  "Uri": "oss://t***.cn-beijing.oss.aliyuncs.com/mod**/",
  "Labels": [
    {
      "Key": "env",
      "Value": "test"
    }
  ],
  "Options": "{}",
  "VersionName": "0.1.0",
  "VersionDescription": "通用情感分析。",
  "TrainingSpec": {},
  "InferenceSpec": {
    "Processor": "tensorflow_gpu_1.12"
  },
  "FormatType": "SavedModel",
  "FrameworkType": "TensorFlow",
  "SourceType": "PAIFlow",
  "SourceId": "region=cn-shanghai,workspaceId=13**,kind=PipelineRun,id=run-sakdb****jdf",
  "ApprovalStatus": "Approved",
  "EvaluationSpec": {},
  "CompressionSpec": {},
  "ExtraInfo": {
    "CoverUris": [
      "https://e***u.oss-cn-hangzhou.aliyuncs.com/st****017.preview.png"
    ],
    "TrainedWords": [
      "albedo_overlord"
    ]
  },
  "Metrics": {},
  "DistillationSpec": {}
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.