Permission Categories
Permissions are organized into categories. When you create a scoped API key, you include only the categories the key needs. The available categories are:Creating Scoped Keys
Define permissions as a JSON object and pass it when creating a key. The top-level key is always"api", containing the categories you want to grant.
Example, Instance management with billing access:
- API: Create API Key
- CLI:
vastai create api-key - SDK:
vast.create_api_key()
Custom Roles
Custom roles let you assign the same set of permissions to multiple team members.- Creating roles: Use the CLI or the Manage page in the web console (requires
team_writeaccess). - Defining permissions: Select from any combination of the categories listed above.
- Assigning roles: Assign created roles to team members through the team management interface or CLI.
Constraints
Constraints narrow a permission category to specific parameter values. This lets you create keys that can only operate on certain resources. Example, Read logs for a single instance only:eq, lte, gte.
API keys using constraints must be created via the CLI (
vastai create api-key) or the API (Create API Key).params to represent placeholder values, useful when generating many keys that perform similar operations.
Endpoint Reference by Category
Below is the complete mapping of which endpoints each permission category controls.instance_read
instance_write
- Attach SSH Key
- Copy
- Cancel Copy
- Cloud Copy
- Cancel Sync
- Change Bid
- Create Instance
- Manage Instance
- Delete Instance
- Detach SSH Key
- Execute
- Prepay Instance
- Reboot Instance
- Recycle Instance
- Create Volume
- Delete Volume
user_read
- Show API Keys
- Show Connections
- Show Environment Variables
- Show IP Addresses
- Show SSH Keys
- Show Subaccounts
- Show User
- Search Templates
user_write
- Create API Key
- Delete API Key
- Create Environment Variable
- Update Environment Variable
- Delete Environment Variable
- Create SSH Key
- Update SSH Key
- Delete SSH Key
- Create Subaccount
- Set User
- Create Team
- Delete Team
- Create Template
- Edit Template
- Delete Template
billing_read
billing_write
machine_read
- Show Machines
- Show Reports
- SLA Backtest — API-only (hosts): replay historical earnings through SLA math. Requires
machine_read. See SLA Backtester. Console hosts should use Set Pricing → SLA preview instead.
machine_write
- Cancel Maintenance
- Cleanup Machine
- List Machine
- Remove Default Job
- Schedule Maintenance
- Set Default Job
- Set Minimum Bid
- Unlist Machine
- Unlist Volume
api wrapper.
misc
- Show Workergroups
- Create Workergroup
- Update Workergroup
- Delete Workergroup
- Show Endpoints
- Create Endpoint
- Delete Endpoint
- Search Benchmarks
- Search Offers
- Search Volumes
api wrapper below (misc covers bundles search).
type values for GET /api/v0/charges/ are gpu, disk, bwd, and bwu. Prefer Account → Billing in the console for SLA settlement credit reconciliation until client charge schemas document SLA line items.