API Key Application & Management
Learn how to apply for, manage, and securely use API keys
Application Process
01
Register Account
Visit the platform registration page and register with email or phone
- Enter email address or phone number
- Set a secure password
- Complete email/SMS verification
- Login to console
02
Access API Keys Management
Find the API Keys management page in the console
- Click "API Keys" in the left menu
- Or access from personal center
- View existing key list
- Check usage status
03
Create New Key
Generate a new API key for interface calls
- Click "Create Key" button
- Enter key name (e.g., Production)
- Select permission scope
- Set IP whitelist (optional)
04
Save Key
Securely save the generated key - it will only be shown once
- Copy the complete key
- Save to a secure location
- Configure in environment variables
- Test key availability
Key Format Example
API Key Format
sk-proj-••••••••••••••••••••••••••••••••••••Prefix:sk-proj-
Length:48 characters
Character Set:Alphanumeric
Environment Variable Configuration
# .env file
OPENAI_API_KEY=sk-proj-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
API_BASE_URL=https://api.example.com/v1Security Best Practices
Don't Hardcode Keys
Never write API Keys directly in code - use environment variables instead
Use Key Rotation
Regularly rotate API Keys, especially during personnel changes
Set IP Whitelist
Restrict key usage to specific IP addresses only
Monitor Usage
Regularly check key usage statistics to detect anomalies
Key Management Features
Permission Control
- • Read/Write permission separation
- • Model access restrictions
- • Call frequency limits
- • Validity period settings
Security Settings
- • IP whitelist
- • Domain restrictions
- • Two-factor authentication
- • Access logs
Monitoring & Statistics
- • Real-time usage
- • Call statistics
- • Error monitoring
- • Cost tracking