Skip to main content
Set up Bring Your Own Key to use your own OpenAI API key and pay raw API costs.

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

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-...
OpenAI only shows your API key once. If you lose it, you’ll need to create a new one.

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:
  1. Smelt will validate the key format
  2. You can click “Test” to verify it works
  3. If valid, the key is ready to use

Test Results

ResultMeaning
✅ ValidKey works and has credits
❌ InvalidKey format wrong or revoked
⚠️ No creditsKey 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
Only one key is active at a time. Select which key to use in Settings.

OpenAI Credits

BYOK means you pay OpenAI directly for API usage.

Adding Credits

  1. Go to platform.openai.com/account/billing
  2. Add a payment method
  3. Add credits or set up auto-recharge

Monitoring Usage

Check your OpenAI usage at:
  • platform.openai.com/usage
Set up usage alerts in OpenAI to avoid running out of credits mid-job.

API Key Best Practices

Create a separate API key just for Smelt. Easier to track usage and revoke if needed.
In OpenAI, set monthly spending limits to prevent unexpected costs.
Check your OpenAI dashboard periodically to track spend.
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.