Use the PAI CLI resource subcommand to query and manage quotas and resource groups.
quota list
pai resource quota list [flags]Parameter | Type | Default | Description |
| string | — | Filter by quota name |
| string | — | Filter by GPU type |
| string | All | Resource type: |
| string | — | Filter by status (comma-separated): |
| string | — | Show only direct child quotas of the specified quota |
| string | — | Batch query by quota IDs (comma-separated) |
| string | — | Filter by labels (key=value, comma-separated) |
| string | — | Display mode: |
| bool | false | Show only quotas that hold resources |
| bool | false | Include usage details (slower response) |
| string | — | Filter by workspace name |
| string | QuotaName | Sort field (supports QuotaId, CPU, GPU, UsedGPU, GmtCreatedTime, and others) |
| string | desc | Sort order: |
| int | 1 | Page number |
| int | 20 | Items per page |
| string | — | Custom output columns. Default: quota_id, quota_name, resource_type, gpu_type, status, gpu_capacity, gpu_used |
quota get
pai resource quota get <quota-id> [--brief] [--with-node-meta]Parameter | Type | Default | Description |
| bool | false | Compact output. Skips usage details and associated workspace information |
| bool | false | Request per-node metadata from the server. The current SDK version doesn't support the NodesMeta response field yet. To view per-node information, use |
quota user-usage
pai resource quota user-usage <quota-id> [flags]View resource usage per user in a quota. Sub-quotas are aggregated by default.
# View resource usage per user (including sub-quotas)
pai resource quota user-usage quota1a2b3c4d5e6f
# Current quota only, sorted by GPU usage in descending order
pai resource quota user-usage quota1a2b3c4d5e6f --self-only --sort-by UsedGPU --order descParameter | Type | Default | Description |
| bool | false | Count this quota only. Don't aggregate sub-quotas |
| string | UserId | Sort field: |
| string | asc | Sort order: |
| string | — | Filter by exact user ID |
| string | — | Fuzzy match by username (from workspace member list) |
| int | — | Show only users with exactly this many workloads |
| string | The first workspace bound to the quota | Workspace used to resolve usernames and scope the query |
| int | 1 | Page number |
| int | 20 | Items per page |
| string | — | Custom output columns. Default: user_id, username, workload_count |
quota workloads
pai resource quota workloads <quota-id> [flags]View queued or running workloads in a quota. By default, shows only your own workloads.
# View your workloads (in queue order)
pai resource quota workloads quota1a2b3c4d5e6f
# View all users' DLC workloads, sorted by enqueue time (newest first)
pai resource quota workloads quota1a2b3c4d5e6f --all-users --workload-type dlc \
--sort-by GmtEnqueuedTime --order desc
# View completed historical workloads
pai resource quota workloads quota1a2b3c4d5e6f --with-historical-data --workload-ids dlc12345678Parameter | Type | Default | Description |
| bool | false | Show workloads from all users (default: your own only) |
| string | All | Queue status: |
| string | All | Workload type: |
| string | — | Filter by workload status (comma-separated): Creating, Queuing, Running, Succeeded, Stopped, Failed, etc. |
| string | — | Comma-separated workload IDs |
| string | — | Comma-separated user IDs |
| string | — | Comma-separated sub-quota IDs |
| string | — | Comma-separated workspace IDs |
| bool | false | Include completed workloads (use with --workload-ids) |
| string | Position | Sort field: |
| string | asc | Sort order: |
| int | 1 | Page number |
| int | 20 | Items per page |
| string | — | Custom output columns. Default: workload_id, workload_name, workload_type, workload_status, status, position, priority, user_name, gmt_enqueued_time |
Common examples
# 1. View your workloads (sorted by queue position by default)
pai resource quota workloads quota-a1b2c3d4e5f6
# 2. View all users' DLC workloads, sorted by enqueue time (newest first)
pai resource quota workloads quota-a1b2c3d4e5f6 \
--all-users --workload-type dlc \
--sort-by GmtEnqueuedTime --order desc
# 3. View queued workloads
pai resource quota workloads quota-a1b2c3d4e5f6 --status Enqueued
# 4. View workloads for specific users
pai resource quota workloads quota-a1b2c3d4e5f6 \
--user-ids 123456789,987654321
# 5. View completed historical workloads
pai resource quota workloads quota-a1b2c3d4e5f6 \
--with-historical-data --workload-ids dlc12345678
# 6. Customize output columns
pai resource quota workloads quota-a1b2c3d4e5f6 \
--columns workload_id,workload_status,position,priority,user_namegroup list
pai resource group list [flags]Parameter | Type | Default | Description |
| string | — | Filter by resource group name |
| string | — | Filter by resource type |
| string | — | Filter by status |
| bool | false | Show only resource groups that hold resources |
| bool | false | Include resource groups outside the current workspace |
| string | — | Sort field |
| string | — | Sort order |
| int | 1 | Page number |
| int | 20 | Items per page |
| string | — | Custom output columns. Default: resource_group_id, name, resource_type, status, node_count, gmt_created_time |
group get
pai resource group get <resource-group-id> [--with-workspace-data]Parameter | Type | Default | Description |
| bool | false | Include associated workspace information |