API Keys
Create, manage, and secure your API keys.
Creating an API Key
Go to Dashboard → API Keys
Click Generate New Key
Enter a descriptive name (3-50 characters)
Click Create
Key Format
Your API key looks like this:
sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxIn your dashboard, keys are displayed as: sk-a1b2...wxyz (first 8 + last 4 characters)
Naming Your Keys
Use descriptive names to track usage and organize your keys:
Production API
Live application
Development
Local testing
CI/CD Pipeline
Automated builds
Mobile App v2
Specific project
Analytics Service
Internal tool
Managing Keys
Enable / Disable
You can temporarily disable a key without deleting it:
Go to API Keys in your dashboard
Click the toggle next to the key
Disabled keys reject all API requests immediately
This is useful for:
Pausing a project temporarily
Testing what happens when a key is invalid
Security incidents (disable first, investigate later)
Regenerate
If you suspect a key has been compromised:
Click Regenerate next to the key
Confirm the action
Copy the new key immediately
Delete
Deleting a key is permanent:
The key stops working immediately
Usage history is preserved for your records
This action cannot be undone
Per-Key Usage Tracking
Every API request is logged with the key that made it. View usage by key in your dashboard:
Total cost per key
Request count
Tokens used (input/output)
Last used timestamp
Models accessed
This helps you:
Track costs per project or environment
Identify unused keys to clean up
Spot unexpected usage patterns
Rate Limits
Key operations (create/regenerate)
15 per hour
API requests
60 per minute
Tokens
2,000,000 per minute
These limits apply per API key. Each key has its own independent rate limit.
Security Best Practices
Do
Use environment variables - Never hardcode keys in source code
Different keys per environment - Separate dev, staging, and production
Name keys descriptively - Makes auditing easier
Rotate regularly - Use the regenerate feature periodically
Delete unused keys - Reduce your attack surface
Monitor usage - Check logs for unexpected activity
Don't
Never commit keys to git - Use
.envfiles (add to.gitignore)Never share keys publicly - Treat them like passwords
Never expose in client-side code - Keys belong on the server only
Environment Variables Example
Team API Keys
When you're part of a team:
Team owners and admins can create keys for the team
All team members can use team API keys
Usage is billed to the team balance
Your personal keys are archived while on a team
See Team Account for more details.
Troubleshooting
"Invalid API Key"
Verify you copied the complete key (including
sk-prefix)Check the key isn't disabled in your dashboard
Confirm you're using the correct base URL:
https://api.tensorx.ai/v1
"Insufficient Balance"
Keys require a wallet balance > $0 to create
Keys are auto-disabled when balance drops to $0.05
Add funds to re-enable your keys
Lost Your Key?
API keys cannot be recovered once lost. You'll need to:
Delete the old key (if you remember which one)
Create a new key
Update your applications with the new key
Need Help?
Email: support@tensorx.ai
Last updated
Was this helpful?

