Create and Manage API Keys
Your API key is your gateway to Agent-CoreX. Learn how to create, secure, and manage it properly.Creating Your First API Key
-
Go to Settings
- Open Dashboard
- Click Settings in the left sidebar
- Select API Keys
-
Create New Key
- Click ”+ Create New Key”
- Give it a meaningful name (e.g., “Production”, “Development”, “Testing”)
-
Select Tier
- Free: 1,000 requests/month, $0/month
- Pro: 100,000 requests/month, $29/month
- Enterprise: Custom limits, contact sales
-
Save the Key
- Copy immediately - it won’t be shown again
- Store securely in your password manager or
.envfile
Key Format
Your API keys always start with a prefix indicating their type:acx_live_- Production keysacx_test_- Testing keysacx_dev_- Development keys
acx_live_1a2b3c4d5e6f7g8h9i0j
Securing Your API Key
✅ DO:
- Store in environment variables:
AGENT_COREX_API_KEY - Use
.envfiles (add to.gitignore) - Rotate keys regularly (every 3 months)
- Use different keys for different environments
- Monitor API usage in your dashboard
❌ DON’T:
- Commit keys to git repositories
- Share keys in Slack/email/documents
- Use the same key for multiple environments
- Hardcode keys in source code
- Log keys in error messages
Environment Variable Setup
macOS/Linux
Windows
Node.js (.env file)
Python
Using Your API Key
With SDKs
With cURL
With Environment Variable in Commands
Key Rotation
Rotate Keys Monthly
- Create new key in your dashboard
- Update code with new key
- Test thoroughly to ensure it works
- Revoke old key after 7 days
- Confirm all systems using new key
Revoke a Key
- Go to Settings → API Keys
- Find the key to revoke
- Click “Revoke”
- Confirm the action
- All requests with that key will fail
Monitoring Key Usage
View API Metrics
- Settings → Usage
- See requests/month
- Track by key
- View trending usage
Set Usage Alerts
- Settings → Alerts
- Alert when reaching 80% limit
- Alert on failed requests
- Email notifications
Troubleshooting
I lost my API key
I lost my API key
Generate a new one immediately:
- Go to Settings → API Keys
- Click “Create New Key”
- Revoke the old key
- Update all your code with the new key
API key not working in my code
API key not working in my code
Common issues:
- Make sure it starts with
acx_live_ - Check it hasn’t expired
- Verify the environment variable is set
- Try using a fresh key
- Check API status at status.agent-corex.com
Can I use the same key for multiple apps?
Can I use the same key for multiple apps?
Yes, but we recommend using different keys:
- Better security (revoke one without affecting others)
- Better monitoring (see which app uses how much)
- Better rate limiting (each key has its own limit)
How often should I rotate keys?
How often should I rotate keys?
We recommend:
- Production: Monthly
- Development: Every 3 months
- Testing: No rotation needed
- After team member leaves: Immediately
Best Practices
Security Checklist
✅ Use environment variables
✅ Add .env to .gitignore
✅ Rotate monthly
✅ Monitor usage
✅ Different keys per env
Development Tips
✅ Use test keys in dev
✅ Use live keys in prod
✅ Log API calls
✅ Implement retry logic
✅ Handle 401 errors
Next Step: Setup MCP Servers →