Prerequisites
Before setting up BYOK:- Paid Smelt subscription (Starter, Growth, or Scale)
- BYOK billing mode selected
- OpenAI account at platform.openai.com
- OpenAI API key with credits
Getting Your OpenAI API Key
1
Go to OpenAI Platform
Visit platform.openai.com
2
Sign Up or Log In
Create an account or log in to existing account
3
Navigate to API Keys
Go to Settings → API Keys (or directly to platform.openai.com/api-keys)
4
Create New Secret Key
Click “Create new secret key”Give it a name like “Smelt Production”
5
Copy the Key
Important: Copy immediately! The key is only shown once.It starts with
sk-...Adding Your Key to Smelt
1
Go to Settings
Click Settings in the Smelt sidebar
2
Click API Keys
Navigate to the API Keys section
3
Click Add API Key
Click the “Add API Key” button
4
Paste Your Key
Paste your OpenAI API key (starts with
sk-...)5
Add a Label (Optional)
Give it a label like “Production” or “Main”
6
Save
Click Save to store your key securely
Verifying Your Key
After adding:- Smelt will validate the key format
- You can click “Test” to verify it works
- If valid, the key is ready to use
Test Results
| Result | Meaning |
|---|---|
| ✅ Valid | Key works and has credits |
| ❌ Invalid | Key format wrong or revoked |
| ⚠️ No credits | Key valid but no OpenAI credits |
Managing Multiple Keys
You can add multiple API keys:- Different keys for different purposes
- Backup keys
- Keys with different spending limits
OpenAI Credits
BYOK means you pay OpenAI directly for API usage.Adding Credits
- Go to platform.openai.com/account/billing
- Add a payment method
- Add credits or set up auto-recharge
Monitoring Usage
Check your OpenAI usage at:- platform.openai.com/usage
API Key Best Practices
Use a dedicated key for Smelt
Use a dedicated key for Smelt
Create a separate API key just for Smelt. Easier to track usage and revoke if needed.
Set spending limits
Set spending limits
In OpenAI, set monthly spending limits to prevent unexpected costs.
Monitor regularly
Monitor regularly
Check your OpenAI dashboard periodically to track spend.
Rotate keys periodically
Rotate keys periodically
For security, consider rotating keys every few months.
Troubleshooting
”Invalid API key”
- Check for typos or extra spaces
- Ensure you copied the full key
- Try generating a new key
”Insufficient credits”
- Add credits in your OpenAI account
- Set up auto-recharge
”Rate limit exceeded”
- Wait a minute and retry
- Check your OpenAI tier limits
- Consider upgrading your OpenAI plan
Smelt handles rate limiting with automatic retries, but severe rate limits may still cause issues.