Skip to main content
More

List model permissions

Call the GET /api/v1/models/permissions endpoint to query the list of authorizable or authorized models and their permission details in the current workspace.

Prerequisites

An API key has been created and configured as the environment variable DASHSCOPE_API_KEY. For more information, see Configure an API key in environment variables.

Request

  • HTTP method: GET
  • Request URL
    Replace {WorkspaceId} with your workspace ID.

    Region

    Endpoint

    China (Beijing)

    https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/models/permissions

  • Authentication Set Authorization: Bearer {API_KEY} in the request header.

Request parameters

All parameters are passed through the query string.

Parameter

Type

Required

Description

name

String

No

Fuzzy search by model name. Performs fuzzy matching against name and model_id. Example: qwen

model

String

No

Exact match by model ID. Performs exact matching against model_id. Example: qwen-plus

page_no

Integer

No

Page number, a positive integer starting from 1. Default value: 1.

page_size

Integer

No

Number of entries per page, ranging from 1 to 200 (maximum 200). Default value: 20.

authorization_scope

String

No

Authorization scope filter. Valid values:

  • AUTHORIZABLE: Authorizable models (default).

  • AUTHORIZED: Authorized models.

Default value: AUTHORIZABLE. Example: AUTHORIZED

action

String

No

Permission action dimension. Valid values: INFERENCE - inference (currently the only supported value). Drives the filter dimension only when authorization_scope=AUTHORIZED. Default value: INFERENCE.

Response parameters

Parameter

Type

Description

request_id

String

The request ID. Example: d5f5201f-ee7a-9e3d-8569-bc0eedec21f9

code

String

Error code. null on success.

message

String

Error message. null on success.

success

Boolean

Whether the call succeeded. Example: true

output.total

Number

Total number. Example: 5

output.page_no

Number

Page number. Example: 1

output.page_size

Number

Number of entries per page. Example: 20

output.permissions

Array[Object]

Permission list. See the sample response.

output.model

String

The model ID. Example: qwen-plus

output.name

String

Display name of the model. Example: 通义千问-Plus

output.permissions[].permissions

Object

Permission details. Example: {"inference":true,"fine_tune":false,"deploy":false}. Contains the following fields:

  • inference (Boolean): Whether the model has model calling permission. Example: true

  • finetune (Boolean): Whether the model has model training permission. Example: false

  • deploy (Boolean): Whether the model has model deployment permission. Example: false

Sample requests

curl "https://dashscope.aliyuncs.com/api/v1/models/permissions?authorization_scope=AUTHORIZED&action=INFERENCE&page_no=1&page_size=20" \
    --header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
    --header 'Content-Type: application/json'

Sample response

{
    "code": null,
    "message": null,
    "success": true,
    "output": {
        "total": 3,
        "page_no": 1,
        "page_size": 20,
        "permissions": [
            {
                "model": "qwen-plus",
                "name": "通义千问-Plus",
                "permissions": {
                    "inference": true,
                    "fine_tune": false,
                    "deploy": false
                }
            },
            {
                "model": "qwen3-max",
                "name": "通义千问3-Max",
                "permissions": {
                    "inference": true,
                    "fine_tune": true,
                    "deploy": false
                }
            },
            {
                "model": "qwen-turbo",
                "name": "通义千问-Turbo",
                "permissions": {
                    "inference": true,
                    "fine_tune": false,
                    "deploy": false
                }
            }
        ]
    },
    "request_id": "d5f5201f-ee7a-9e3d-8569-bc0eedec21f9"
}

Error codes

If the call fails, an error message is returned. For more information about error codes and solutions, see Error messages.