Bring Your Own Key (BYOK)
Bring Your Own Key (BYOK) allows you to use your personal API keys with ai.KMITL, giving you unlimited access to AI models while maintaining full control over costs and usage.
What is BYOK?
BYOK means:
- Add your own API keys from AI providers
- Unlimited messages - no monthly limit
- Direct billing to your account
- Full control over costs
- Access to all models your key supports
Why Use BYOK?
Benefits
Unlimited Access:
- No 1,000 message monthly limit
- Use as much as you need
- No waiting for quota reset
Cost Control:
- Pay only for what you use
- Often cheaper than subscriptions
- Transparent pricing
- Monitor your spending
Access to Latest Models:
- Get newest models immediately
- Beta features and updates
- Premium models that require direct billing
- Custom model configurations
Privacy:
- Keys stored encrypted
- Direct connection to providers
- No intermediary processing
- You control data flow
Supported Providers
ai.KMITL supports API keys from:
OpenAI
- Example Models: GPT-5.1, GPT-5, GPT-4, o1, o3
- Get key: platform.openai.com
- Pricing: Pay-per-token
- Best for: General use, reasoning
Anthropic
- Example Models: Claude 4.5 Sonnet/Haiku, Claude 4.0 Opus
- Get key: console.anthropic.com
- Pricing: Pay-per-token
- Best for: Detailed responses, code
Google AI
- Example Models: Gemini 2.5 Pro, Gemini 2.0 Flash, Gemini 2.5 Flash Lite, Google Gemma 3 (27B)
- Get key: makersuite.google.com
- Pricing: Pay-per-token, often with trial credits
- Best for: Long contexts, multimodal
Groq
- Example Models: Llama 4 Maverick, Llama 3.1 8B Instant
- Get key: console.groq.com
- Pricing: Very competitive
- Best for: Speed, efficiency
OpenRouter
- Models: Access to many providers
- Get key: openrouter.ai
- Pricing: Varies by model
- Best for: Model variety, convenience
Getting API Keys
General Steps
- Sign up with the AI provider
- Verify your account (may need phone/payment)
- Navigate to API section
- Generate new API key
- Copy the key immediately (shown once!)
- Store securely
- Add to ai.KMITL
OpenAI Example
- Go to platform.openai.com
- Create account or sign in
- Click API Keys in sidebar
- Click "Create new secret key"
- Name your key (e.g., "ai.KMITL")
- Copy the key (starts with
sk-) - Store safely - you won't see it again!
Anthropic Example
- Go to console.anthropic.com
- Sign up or sign in
- Navigate to API Keys
- Click "Create Key"
- Name it and copy
- Save securely
Adding Keys to ai.KMITL
Step-by-Step
- Sign in to ai.KMITL
- Click your profile icon (top right)
- Go to Settings
- Navigate to Providers and BYOK AI Providers section
- Select the provider (OpenAI, Anthropic, etc.) and Click
Setup BYOK - Paste your API key
- Click "Save"
- Key is validated and encrypted
Automatic Key Usage
By default, ai.KMITL will utilize your included monthly quota first. Once your quota is exhausted, the system will automatically switch to using your configured BYOK (Bring Your Own Key) API keys for eligible models. This ensures seamless access to AI features without interruption. You do not need to manually toggle between included usage and BYOK; the transition is handled automatically when your quota limit is reached.
Monitoring Usage
At Provider Dashboard
- Check provider's dashboard
- See exact costs
- Usage statistics
- Billing information
Monitor Costs
Always monitor your usage at the provider's dashboard to avoid unexpected charges!
Security
How Keys Are Stored
- Encrypted at rest
- Secure transmission (HTTPS)
- Never logged in plain text
- No one can see your actual key
- You can delete anytime
Best Practices
Do:
- ✅ Use unique keys for ai.KMITL
- ✅ Monitor usage regularly
- ✅ Set usage limits at provider
- ✅ Revoke and rotate keys periodically
- ✅ Delete unused keys
Don't:
- ❌ Share your API keys with others. even your own best friends.
- ❌ Commit keys to git or any version control software
- ❌ Use keys with billing you can't control
- ❌ Ignore usage monitoring
- ❌ Use someone else's keys
Setting Usage Limits
At provider dashboards:
- Set monthly spending limits
- Enable usage alerts
- Configure rate limits
- Set up billing notifications
Example for OpenAI:
- Organization Settings → Limits
- Set Usage limits ($10, $50, etc.)
- Enable email notifications
- Get alerts at thresholds
Cost Management
Understanding Costs
Pricing models:
- Per token - Most common
- Per request - Some models
- Tiered - Volume discounts
Typical costs (per 1M tokens):
| Model | Input | Cached Input | Output |
|---|---|---|---|
| GPT-5.1 / GPT-5.1 Chat Latest | $1.25 | $0.125 | $10.00 |
| GPT-5 / GPT-5 Chat Latest | $1.25 | $0.125 | $10.00 |
| GPT-5.1 Codex | $1.25 | $0.125 | $10.00 |
| GPT-5 Codex | $1.25 | $0.125 | $10.00 |
| GPT-5 Mini | $0.25 | $0.025 | $2.00 |
| GPT-5 Nano | $0.05 | $0.005 | $0.40 |
| GPT-4o | $2.50 | $0.50 | $10.00 |
| GPT-4.1 Mini | $0.40 | $0.04 | $1.60 |
| o3-mini | $1.10 | — | $4.40 |
| Claude 4 Sonnet | $3.00 | — | $15.00 |
| Claude 4 Opus | $15.00 | — | $75.00 |
| Gemini 2.0 Flash | $0.15 | — | $0.60 |
| Gemini 2.5 Pro (≤128k ctx) | $1.25 | — | $5.00 |
| DeepSeek V3 | $0.27 | — | $1.10 |
| DeepSeek R1 | $0.55 | — | $2.19 |
| xAI Grok 3 | $3.00 | — | $15.00 |
Pricing Update
This pricing table is accurate as of November 2025. Please refer to the official provider websites for the most up-to-date information, as prices are subject to change.
Cost Example
If you send 1,000 messages averaging 500 tokens each with GPT-5, that's ~500K tokens ≈ $0.50-1.00
Much cheaper than ChatGPT Plus at $20/month!
Cost Optimization
Strategies:
Choose right models
- Gemini Flash for speed
- Use GPT-5-mini for simple tasks
- Use Claude Sonnet or GPT-5 or Gemini 2.5 Pro only when needed
Optimize prompts
- Be concise but clear
- Don't repeat context
- Use system messages efficiently
Manage conversations
- Start new chats for new topics
- Don't carry unnecessary context
- Delete old messages if continuing
Set limits
- Daily spending caps
- Usage alerts
- Rate limiting
Provider Trial Credits
Some providers offer trial credits or community quotas:
Google Gemini:
- Generous promotional credits
- 60 requests per minute
- Good for experimentation
Groq:
- Community quota available
- Fast responses
- Limited capacity
Troubleshooting
Key Not Working
Check:
- Is key valid? (not revoked at provider)
- Does key have credits?
- Is billing set up at provider?
- Are there rate limits hit?
- Is key correctly pasted? (no extra spaces)
Fix:
- Verify at provider dashboard
- Regenerate key if needed
- Update billing information
- Wait if rate limited
- Re-enter key carefully
Unexpected Charges
If charges seem high:
- Check provider dashboard for details
- Review usage patterns in ai.KMITL
- Look for long conversations with large context
- Check if web search is being used heavily
- Verify no unauthorized access
Prevention:
- Set spending limits
- Enable usage alerts
- Monitor regularly
- Optimize prompts
Key Revoked Error
Cause: Key was deleted at provider
Fix:
- Generate new key at provider
- Update in ai.KMITL settings
- Delete old key entry
Rate Limit Errors
Cause: Too many requests too fast
Fix:
- Wait a few minutes
- Spread out requests
- Upgrade tier at provider
- Use different provider temporarily
Comparing Costs
Included Access vs BYOK
Included Access (1,000 messages):
- ✅ No cost
- ✅ Simple
- ❌ Limited messages
- ❌ Must wait for reset
BYOK:
- ✅ Unlimited usage
- ✅ Often cheaper than subscriptions
- ✅ Full control
- ❌ Requires API key setup
- ❌ Need to monitor costs
BYOK vs ChatGPT Plus
ChatGPT Plus ($20/month):
- GPT-4 access
- Priority access
- Fixed cost
- Limited to ChatGPT interface
BYOK with ai.KMITL:
- Multiple providers
- Pay only for usage
- Often much cheaper
- More flexibility
- Better features (web search, folders, etc.)
Break-even: If you use less than ~$20 worth of API calls per month, BYOK is cheaper!
FAQ
Is BYOK safe?
Yes! Keys are encrypted and securely stored. Only you can access them.
Can I use included access and BYOK together?
Yes! The system will automatically use your included quota first, and switch to your BYOK as a backup once your included messages run out.
What happens if my key runs out of credits?
You'll get errors. Add credits at provider or fall back to the included system access.
Can I share my BYOK account?
No. API keys are personal. Each user should have their own.
Do you charge fees on top of API costs?
No! You pay only what the provider charges. ai.KMITL adds no fees.
Can I remove my keys?
Yes, anytime. Delete in Settings.
What if I lose access to my key?
Revoke at provider and generate a new one. Update in ai.KMITL.
Start Small
Try BYOK with Gemini's promotional credits or Groq's community quota to test it out without cost. Expand to other providers as needed!
Next Steps
- Configure Settings & Preferences
- Learn Usage Quotas
- Optimize Better Results
- Check Data Privacy
