Retrieves a list of models.
Try it now
Test
RAM authorization
|
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.
|
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.