Overview
Virtual keys allow you to create API keys with:- Custom budgets and rate limits
- Model access restrictions
- Expiration dates
- Team associations
- Metadata and tags
Generate a Key
Create a virtual key using the master key:Key Generation Parameters
Basic Parameters
Budget Parameters
Rate Limiting
Team Association
Complete Example
Get Key Information
Retrieve information about a key:Update a Key
Modify key properties:Delete a Key
Revoke a virtual key:List All Keys
Get all virtual keys:Key Auto-Rotation
Configure automatic key rotation:key_alias remains constant while the underlying key changes.
Budget Tracking
Check Spend
Monitor key spending:spend: Current spendmax_budget: Budget limitbudget_reset_at: When budget resets
Budget Alerts
Set soft budget for alerts:config.yaml
Model Access Control
Restrict to Specific Models
Allow All Models
Omit themodels parameter or use null:
Rate Limiting
Per-Key Rate Limits
Team Keys
Generate keys associated with teams:1
Create a Team
2
Generate Team Key
Key Metadata
Attach custom metadata to keys:- Cost allocation
- Usage tracking
- Access auditing
- Organizational reporting
Security Best Practices
1. Master Key Protection
2. Key Rotation
Rotate keys regularly:3. Principle of Least Privilege
Grant minimum required access:4. Monitor Usage
Regularly audit key usage:Programmatic Key Management
Next Steps
Budget Alerts
Set up spending alerts and notifications
Configuration
Advanced proxy configuration
Quick Start
Get started with the proxy
Docker Deployment
Deploy in production