API keys
Create, limit, copy and delete the keys your apps use.
Open API keys in the console menu, or go to /keys. The list shows each key's name, status, how much of its limit is used, and when it was last used.
Create a key
- Click Create API key.
- Name it after where it will be used, for example "Production" or "Laptop".
- Optionally set a spending limit, an expiry date, the models it may use, and the IP addresses it may be used from.
- Save, then copy the key from the list. It starts with
sk-.
| Setting | What it does |
|---|---|
| Name | Your label for the key |
| Expiry | The key stops working after this date |
| Quota | The most this key may spend; or turn on unlimited to use your whole balance |
| Model limits | Only these models may be called with the key; empty means all |
| IP allowlist | Only these IPs or CIDR ranges may use the key; empty means any |
A key works like a password. Keep it out of code repositories, screenshots, logs and chats. If you think it leaked, delete it and create a new one.
Edit, turn off or delete
Each row has Edit, an on/off switch and Delete. Turning a key off keeps its settings and blocks calls; deleting it is permanent and takes effect at once.
Use a key in an app
Copy connection info in a key's menu copies the key and the base URL together. For coding agents and chat apps, see Apps.
