All Products
Search
Document Center

Platform For AI:ListModels

Last Updated:Oct 17, 2025

Retrieves a list of models.

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:ListModels

list

*All Resource

*

None None

Request syntax

GET /api/v1/models HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

PageNumber

integer

No

The page number of the model list. The value starts from 1. The default value is 1.

1

PageSize

integer

No

The number of models to display on each page in a paged query. The default value is 10.

10

Order

string

No

The order in which to sort the results of a paged query. The default value is ASC.

  • ASC: ascending order.

  • DESC: descending order.

DESC

SortBy

string

No

The field to use for sorting in a paged query. Currently, only the GmtCreateTime field is supported.

GmtCreateTime

WorkspaceId

string

No

The workspace ID. The returned list contains only the models in the specified workspace. For more information about how to obtain a workspace ID, see ListWorkspaces.

324**

ModelName

string

No

The model name. This parameter is used to filter the model list.

情感分析

Label

string

No

The label string. This parameter is used to filter the list. Models are returned if their label keys or values contain the specified string.

key1

Provider

string

No

The provider. If you specify a provider, only the public models from that provider are returned. If you leave this parameter empty, your own models are returned.

pai

Domain

string

No

The domain. This parameter is used to filter the model list by domain. Examples: nlp (natural language processing) and cv (computer vision).

nlp

Task

string

No

The task. This parameter is used to filter the model list by task type. Example: text-classification.

text-classification

Origin

string

No

The model source. This parameter is used to filter the model list by community or organization. Examples: ModelScope and HuggingFace.

ModelScope

Query

string

No

The query condition. This parameter performs a fuzzy match on ModelName, Domain, Task, LabelKey, and LabelValue. For example, if you enter nlp, models that match in any of these fields are returned.

nlp

ModelType

string

No

The model type.

Endpoint

Collections

string

No

The collections to which the model belongs. You can specify multiple collections. Separate them with commas (,).

AI4D,QuickStart

Tag

array<object>

No

The list of tags.

Endpoint

object

No

The tag information.

Key

string

No

The key of the tag.

key1

Value

string

No

The value of the tag.

value1

Conditions

array<object>

No

The conditions.

object

No

Column

string

No

The parameter name. Example: ParameterSize.

ParameterSize

Operator

string

No

The operator. Example: LessThan.

LessThan

Value

string

No

The value. Example: 3000.

3000

Response elements

Element

Type

Description

Example

object

The response body.

RequestId

string

The request ID.

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

Models

array

The list of models.

Model

The model.

TotalCount

integer

The total number of models.

15

Examples

Success response

JSON format

{
  "RequestId": "5A14FA81-DD4E-******-6343FE44B941",
  "Models": [
    {
      "ModelId": "model-1123*****",
      "ModelName": "情感分析",
      "GmtCreateTime": "2021-01-21T17:12:35Z",
      "GmtModifiedTime": "2021-01-21T17:12:35Z",
      "WorkspaceId": "234**",
      "UserId": "1557702098******",
      "OwnerId": "1557702098******",
      "ModelDescription": "情感分析。",
      "Accessibility": "PUBLIC",
      "LatestVersion": {
        "VersionName": "0.1.0",
        "GmtCreateTime": "2021-01-21T17:12:35Z",
        "GmtModifiedTime": "2021-01-21T17:12:35Z",
        "UserId": "155770209******",
        "OwnerId": "155770209******",
        "Uri": "oss://mybucket.oss-cn-beijing.aliyuncs.com/mypath/",
        "VersionDescription": "情感分析。",
        "FormatType": "SavedModel",
        "FrameworkType": "TensorFlow",
        "Options": "{}",
        "SourceType": "PAIFlow",
        "SourceId": "region=cn-shanghai,workspaceId=13**,kind=PipelineRun,id=run-sakdb****jdf",
        "ApprovalStatus": "Approved",
        "Labels": [
          {
            "Value": "v1",
            "Key": "k1"
          }
        ],
        "Metrics": {
          "Results": [
            {
              "Dataset": {
                "DatasetId": "d-sdkjanksaklerhfd"
              },
              "Metrics": {
                "cer": 0.175
              }
            },
            {
              "Dataset": {
                "Uri": "oss://xxxx/"
              },
              "Metrics": {
                "cer": 0.172
              }
            }
          ]
        },
        "TrainingSpec": {},
        "InferenceSpec": {
          "processor": "tensorflow_gpu_1.12"
        },
        "EvaluationSpec": {},
        "CompressionSpec": {},
        "ExtraInfo": {
          "CoverUris": [
            "https://e***u.oss-cn-hangzhou.aliyuncs.com/st****017.preview.png"
          ],
          "TrainedWords": [
            "albedo_overlord"
          ]
        },
        "DistillationSpec": {}
      },
      "OrderNumber": 101,
      "Origin": "ModelScope",
      "Domain": "nlp",
      "Task": "text-classifiaction",
      "ModelDoc": "https://***.md",
      "Provider": "pai",
      "ModelType": "Checkpoint",
      "Labels": [
        {
          "Key": "env",
          "Value": "test"
        }
      ],
      "Tags": [
        {
          "Key": "env",
          "Value": "test"
        }
      ],
      "ExtraInfo": {
        "RatingCount": 2866,
        "Rating": 4.94,
        "FavoriteCount": 34992,
        "CommentCount": 754,
        "CoverUris": [
          "https://e***u.oss-cn-hangzhou.aliyuncs.com/drea***w.png"
        ],
        "TippedAmountCount": 32,
        "DownloadCount": 606056
      },
      "ParameterSize": 1024,
      "GmtLatestVersionModifiedTime": "2021-01-21T17:12:35Z"
    }
  ],
  "TotalCount": 15
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.