API key management
Your apps use an API key to reach TokenReply. Each key can have its own USD limit, expiration time, allowed models and IP whitelist. Give each app its own key.
Create an API key
Open the API Key page and select “Create API Key”. Give it a name, set any limits you want and submit, then select “Copy API Key” in the list.
Keep your key private
You can see a key again any time with “Show API Key” or “Copy API Key” on the API Key page. If it leaks, refresh it or disable it.
API key settings
| Setting | What it does |
|---|---|
| Name | Name it after where you use it, like “SillyTavern”, “JanitorAI” or “Laptop”. |
| Channel | Decides which models this key can use and at what price. The options you see depend on your account tier. |
| USD Limit | The most this key can spend, in USD. Choose Unlimited to spend from your usage allowance and wallet with no cap on the key. |
| Expiration Time | The key stops working at this time. Handy for a key you share or only need for a while. |
| Model Limits | Only these models work with the key. Leave it empty to allow every model your Channel setting and tier include. |
| IP Whitelist | Accept requests only from these IP addresses. |
Manage and protect your keys
- Rename a key any time.
- “Refresh” gives you a new key and turns off the old one right away.
- You can disable or delete keys you created. Keys the system made for you can’t be disabled or deleted, but you can rename and refresh them.
- With one key per app, replacing a key only touches that app.
- Keep keys out of screenshots, public repos, browser code and chat messages.
- Give each key only the models and USD limit it needs.
- Disable keys you no longer use. If a key leaks, disable it and create a new one.
Connect your app
Using API keys has the API URL and setup for apps, Python, Node.js and cURL.
Rate limits
Requests are rate limited, and Plus has a higher limit. If you get a 429 error, wait a moment and send fewer requests at once.
Next steps
- Find the API URL and send your first request in Using API keys
- Check your spending and add funds in Billing and balance
- Look up URLs and headers in Base URL and authentication
- Copy working code from Code examples
