All Products
Search
Document Center

Platform For AI:PAI CLI resource management

Last Updated:Sep 01, 2026

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

--name

string

Filter by quota name

--gpu-type

string

Filter by GPU type

--resource-type

string

All

Resource type: ECS Lingjun SelfManagedAckPro SelfManagedAckLingjun SelfManagedASI

--status

string

Filter by status (comma-separated): Creating Ready Scaling Deleting Deleted

--parent-quota-id

string

Show only direct child quotas of the specified quota

--quota-ids

string

Batch query by quota IDs (comma-separated)

--labels

string

Filter by labels (key=value, comma-separated)

--layout-mode

string

Display mode: Tree or List (Tree mode lists only root quotas when no other filters are applied)

--has-resource

bool

false

Show only quotas that hold resources

--verbose

bool

false

Include usage details (slower response)

--workspace-name

string

Filter by workspace name

--sort-by

string

QuotaName

Sort field (supports QuotaId, CPU, GPU, UsedGPU, GmtCreatedTime, and others)

--order

string

desc

Sort order: asc or desc

--page

int

1

Page number

--page-size

int

20

Items per page

--columns

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

--brief

bool

false

Compact output. Skips usage details and associated workspace information

--with-node-meta

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 pai api paistudio GetQuota instead

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 desc

Parameter

Type

Default

Description

--self-only

bool

false

Count this quota only. Don't aggregate sub-quotas

--sort-by

string

UserId

Sort field: UserId SubmittedCPU SubmittedMemory SubmittedGPU UsedCPU UsedMemory UsedGPU WorkloadCount

--order

string

asc

Sort order: asc or desc

--user-id

string

Filter by exact user ID

--username

string

Fuzzy match by username (from workspace member list)

--workload-count

int

Show only users with exactly this many workloads

--workspace-id

string

The first workspace bound to the quota

Workspace used to resolve usernames and scope the query

--page

int

1

Page number

--page-size

int

20

Items per page

--columns

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 dlc12345678

Parameter

Type

Default

Description

--all-users

bool

false

Show workloads from all users (default: your own only)

--status

string

All

Queue status: Enqueued (waiting) or Dequeued (scheduled)

--workload-type

string

All

Workload type: dlc dsw eas tensorboard

--workload-status

string

Filter by workload status (comma-separated): Creating, Queuing, Running, Succeeded, Stopped, Failed, etc.

--workload-ids

string

Comma-separated workload IDs

--user-ids

string

Comma-separated user IDs

--sub-quota-ids

string

Comma-separated sub-quota IDs

--workspace-ids

string

Comma-separated workspace IDs

--with-historical-data

bool

false

Include completed workloads (use with --workload-ids)

--sort-by

string

Position

Sort field: WorkloadId Position Priority GmtEnqueuedTime CPU GPU WorkloadStatus and others

--order

string

asc

Sort order: asc or desc

--page

int

1

Page number

--page-size

int

20

Items per page

--columns

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_name

group list

pai resource group list [flags]

Parameter

Type

Default

Description

--name

string

Filter by resource group name

--resource-type

string

Filter by resource type

--status

string

Filter by status

--has-resource

bool

false

Show only resource groups that hold resources

--all

bool

false

Include resource groups outside the current workspace

--sort-by

string

Sort field

--order

string

Sort order

--page

int

1

Page number

--page-size

int

20

Items per page

--columns

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

--with-workspace-data

bool

false

Include associated workspace information