API Keys Management
Create, manage, and monitor your API keys
API Keys Management
API keys are used to authenticate your applications when making requests to the Aize Platform.
Creating an API Key
Prerequisites
- Minimum $5 wallet balance required
- If balance is insufficient, you'll see a deposit prompt
Steps
-
Click "Create API Key" button
-
Fill in the required information:
- Label: Human-readable name (e.g., "Production App", "Testing")
- Monthly Limit (optional): Maximum spending per month in USD
- Allowed Models (optional): Restrict key to specific models
- Scope: Personal or Team (Team only available for Admins/Owners)
-
Click "Create"
-
⚠️ IMPORTANT: Copy the API key immediately - it's shown only once!
Key Scopes
Personal Keys
- Created by any member
- Visible only to creator
- Cannot be shared with team
- Usage tracked individually
- Perfect for personal projects
Team Keys (Admins/Owners only)
- Visible to all admins/owners
- Shared across organization
- Usage appears in team analytics
- Ideal for production services
API Key Details
Each API key card displays:
Basic Information
- Masked Key:
sk-****...last8chars - Copy Button: Click to copy full masked key
- Label: Your custom name
- Created: Date and time of creation
- Created By: Member who created it (name + email)
- Last Used: Most recent API call timestamp
Usage & Limits
Monthly Usage Progress Bar
- Shows current month's spending
- Format:
$X.XX / $Y.YY (Z%) - Automatically resets on 1st of each month
- Color codes:
- Green: < 75% of limit
- Yellow: 75-90% of limit
- Red: > 90% of limit
When monthly limit is reached:
- API returns
402 Payment Required - Key automatically works again next month
- Or increase the limit anytime
Model Restrictions
If you've restricted the key to specific models:
- Allowed Models badge appears
- Hover to see list of permitted models
- Requests to other models return
403 Forbidden
Managing API Keys
Block a Key
Temporarily disable a key without deleting it:
- Click "Block" button on key card
- Confirm action
- Key immediately stops working
- All requests return
401 Unauthorized
Use cases:
- Suspicious activity detected
- Key leaked or compromised
- Temporarily pause a service
To unblock:
- Click "Unblock" button
- Key immediately works again
Revoke a Key
Permanently delete an API key:
- Click "Revoke" button
- Confirm deletion
- Key is permanently deleted
- Cannot be recovered
⚠️ Warning: This action cannot be undone!
Use when:
- Key is no longer needed
- Replacing with a new key
- Confirmed security breach
Usage Tracking
Monitor how your keys are being used:
Per-Key Analytics
View in Request Logs page:
- Navigate to Request Logs
- Filter by API key
- See all requests made with that key:
- Timestamp
- Model used
- Tokens consumed
- Cost per request
- Latency
- Success/error status
Monthly Spending
Track spending per key:
- Current month's total
- Progress towards limit (if set)
- Historical spend (view past months)
Security Best Practices
Key Storage
✅ DO:
- Store keys in environment variables
- Use secret management services (AWS Secrets Manager, HashiCorp Vault)
- Rotate keys regularly
- Use different keys for dev/staging/production
❌ DON'T:
- Commit keys to version control
- Share keys in Slack/email
- Hardcode in application code
- Use same key across all environments
Key Rotation
Recommended schedule:
- Production keys: Every 90 days
- Development keys: Every 180 days
- Immediately: If key is compromised
Steps to rotate:
- Create new API key
- Update environment variables in your app
- Deploy updated configuration
- Verify new key works
- Revoke old key
Monitoring
Set up alerts for:
- High usage: Approaching monthly limit
- Unusual patterns: Spike in requests
- Errors: Increased error rate
- New locations: Requests from unexpected IPs (if tracking)
API Key Permissions by Role
| Action | Member | Admin | Owner |
|---|---|---|---|
| Create personal key | ✅ | ✅ | ✅ |
| Create team key | ❌ | ✅ | ✅ |
| View own keys | ✅ | ✅ | ✅ |
| View all team keys | ❌ | ✅ | ✅ |
| Block own keys | ✅ | ✅ | ✅ |
| Block team keys | ❌ | ✅ | ✅ |
| Revoke own keys | ✅ | ✅ | ✅ |
| Revoke team keys | ❌ | ✅ | ✅ |
Common Issues
"Insufficient Balance" Error
Problem: Cannot create API key due to low wallet balance
Solution:
- Click "Deposit" in the error modal
- Add minimum $5 to wallet
- Try creating key again
"Monthly Limit Exceeded"
Problem: Key stops working mid-month
Solution:
- Go to API Keys page
- Find the affected key
- Click key card to expand
- Increase monthly limit
- Or wait until next month for automatic reset
"Invalid API Key"
Problem: API returns 401 Unauthorized
Possible causes:
- Key was revoked
- Key was blocked
- Wrong key format
- Organization is frozen
Solution:
- Check key status in dashboard
- Verify wallet balance > $0
- Ensure correct key is being used
- Create new key if needed
Using API Keys
See Quick Start Guide for code examples using your API keys.
Basic usage:
Authorization: Bearer YOUR_API_KEYOr:
x-api-key: YOUR_API_KEY