--json-input TEXT: Provide raw scopes document as JSON for advanced usage
--config-path TEXT: Custom config path
Examples:
# Create admin key with full permissions
chutes keys create --name admin --admin
# Create key for invoking all chutes
chutes keys create --name invoke-all --chutes --action invoke
# Create key for reading specific chute
chutes keys create --name readonly-key --chute-ids my-chute-id --action read# Create key for managing images
chutes keys create --name image-manager --images --action write
# Create key with advanced scopes using JSON
chutes keys create --name advanced-key --json-input '{"scopes": [{"object_type": "chutes", "action": "invoke"}]}'
Key Types:
Admin Keys: Full account access including all resources
Scoped Keys: Limited access based on object type and action
Using Your API Key:
After creating a key, you'll receive output like:
API key created successfully
{
"api_key_id": "...",
"name": "my-key",
"secret_key": "cpk_xxxxxxxxxxxxxxxx"
}
To use the key, add "Authorization: Basic cpk_xxxxxxxxxxxxxxxx" to your headers!
chutes keys get
Get details about a specific API key.
chutes keys get <name_or_id>
Example:
chutes keys get my-key
chutes keys delete
Delete an API key.
chutes keys delete <name_or_id>
Example:
# Delete by name
chutes keys delete old-key
Safety Notes:
Deleted keys cannot be recovered
Active deployments using the key will lose access
Always rotate keys before deletion in production
Secrets Management
Secrets allow you to securely store sensitive values (like API tokens) that your chutes need at runtime.
chutes secrets create
Create a new secret for a chute.
chutes secrets create [OPTIONS]
Options:
--purpose TEXT: The chute UUID or name this secret is for (required)
--key TEXT: The secret key/environment variable name (required)
--value TEXT: The secret value (required)
--config-path TEXT: Custom config path
Examples:
# Create a HuggingFace token secret for a chute
chutes secrets create --purpose my-llm-chute --key HF_TOKEN --value hf_xxxxxxxxxxxx
# Create an API key secret
chutes secrets create --purpose my-chute --key EXTERNAL_API_KEY --value sk-xxxxxxxx
chutes secrets list
List your secrets.
chutes secrets list [OPTIONS]
Options:
--limit INTEGER: Number of items per page (default: 25)
# Check network connectivity
curl -I https://api.chutes.ai/ping
# Try with different username (may already be taken)
chutes register --username alternative_username
# Verify wallet path existsls ~/.bittensor/wallets/
API key not working?
# Verify key exists and check scopes
chutes keys list
chutes keys get my-key
# Ensure you're using the secret_key value with "Authorization: Basic" header
Configuration issues?
# Check config file exists and has correct formatcat ~/.chutes/config.ini
# Verify environment variables aren't overridingecho$CHUTES_CONFIG_PATHecho$CHUTES_API_URL