Getting Your API Key
1
Create Account
Sign up for free at llmadaptive.uk - no credit card required
2
Create Project
Create a new project or select an existing one from your dashboard
3
Generate API Key
Click “Generate API Key” and copy your key - you’ll need it for requests
4
Secure Storage
Store your API key securely using environment variables or your preferred secrets manager
Security: Never expose your API key in client-side code, version control, or public repositories. Always use environment variables or secure secret management systems.
Using Your API Key
HTTP Headers
Adaptive accepts standard OpenAI-compatible authentication headers:SDK Integration
Environment Variables
Recommended Setup
Rate Limits
Current Limits
Free Tier
100 requests/minute
Perfect for getting started and small projects
Perfect for getting started and small projects
Pro Tier
1,000 requests/minute
For production applications and growing businesses
For production applications and growing businesses
Enterprise
Custom limits
Contact us for high-volume requirements
Contact us for high-volume requirements
Rate Limit Headers
Every response includes rate limit information:Handling Rate Limits
Authentication Errors
Common Error Codes
401 Unauthorized
Cause: Invalid or missing API key
Solution: Check your API key and ensure it’s correctly set in headers
Solution: Check your API key and ensure it’s correctly set in headers
429 Too Many Requests
Cause: Rate limit exceeded
Solution: Implement retry logic with exponential backoff
Solution: Implement retry logic with exponential backoff
403 Forbidden
Cause: API key doesn’t have required permissions
Solution: Check your subscription plan and key permissions
Solution: Check your subscription plan and key permissions
500 Server Error
Cause: Temporary server issue
Solution: Retry the request after a brief delay
Solution: Retry the request after a brief delay
Error Response Format
Security Best Practices
API Key Management
1
Use Environment Variables
Never hardcode API keys in your source code - always use environment variables
2
Rotate Keys Regularly
Generate new API keys periodically and update your applications
3
Limit Key Scope
Use separate API keys for development, staging, and production environments
4
Monitor Usage
Regularly check your API usage and set up alerts for unusual activity
Security Checklist
✅ Do This
Store keys in environment variables
Use HTTPS for all requests
Rotate keys regularly
Monitor API usage patterns
Set up usage alerts
Use HTTPS for all requests
Rotate keys regularly
Monitor API usage patterns
Set up usage alerts
❌ Avoid This
Hardcode keys in source code
Commit keys to version control
Share keys in chat/email
Use production keys in development
Ignore unusual usage patterns
Commit keys to version control
Share keys in chat/email
Use production keys in development
Ignore unusual usage patterns
Multiple API Keys
Managing Multiple Keys
Troubleshooting
Common Authentication Issues
API Key Not Working
API Key Not Working
Symptoms: Getting 401 Unauthorized errorsPossible Causes:
- API key is incorrect or malformed
- API key has expired or been revoked
- Wrong authentication header format
- Double-check your API key in the dashboard
- Ensure you’re using the correct header format
- Generate a new API key if needed
- Verify environment variable names match your code
Rate Limits Hit Quickly
Rate Limits Hit Quickly
Symptoms: Frequent 429 errorsPossible Causes:
- Making requests too quickly
- Multiple instances using the same key
- Inefficient request patterns
- Implement request queuing and rate limiting
- Use different API keys for different services
- Enable caching to reduce duplicate requests
- Consider upgrading your plan for higher limits
Environment Variables Not Loading
Environment Variables Not Loading
Symptoms: API key is undefined or nullPossible Causes:
- .env file not in correct location
- Environment variable name mismatch
- .env file not loaded by framework
- Verify .env file is in project root
- Check environment variable names match exactly
- Ensure your framework loads .env files (use dotenv if needed)
- Test with
console.log(process.env.ADAPTIVE_API_KEY)