One Key per Script and Teammate: Spend Caps, Expiry, Model Limits and Organization Accounts
CQTAI
10/28/2026

The usual way an AI API bill goes wrong is not a hack. It is one key, used by one script, that nobody limited. A loop that never exits, a demo posted to a public repository, or a teammate who left: each of them is a key with the whole account behind it.
The fix is cheap and you do it once: stop sharing one key, and give every key limits.
One key per purpose
Create keys on the API keys page. Make a separate key for each thing that calls the API:
- each service or environment (production, staging, local development);
- each automation or cron job;
- each teammate or contractor;
- each customer integration, if you resell access.
Name keys after what they do, such as prod-chat-backend or nightly-image-batch. A good name is what lets you answer "what is this key for?" six months later, and it makes revoking the right one a ten second job instead of an investigation.
Separate keys also make your usage readable. When every key has one job, the activity page tells you which job spent the points.
The limits a key can carry
A key is more than a secret string. When you create or edit one you can set:
| Limit | What it protects against |
|---|---|
| Spend cap | A runaway loop. Once the key has used its allowance, calls stop. |
| Expiry date | A key that should only live for a trial, a contract or a launch week. |
| Model allow-list | A key that only needs one chat model, which should not be able to spend on video. |
| IP allow-list | A leaked key that is only valid from your own servers. |
| Enabled switch | Pausing a key without deleting it, so you can turn it back on. |
Set the spend cap lower than you think you need. Raising a cap takes ten seconds. Recovering from an unbounded one can take a support ticket and a post-mortem.
A rule of thumb that works well:
- a production key gets a generous cap, an IP allow-list and no expiry, and you rotate it on a schedule;
- a batch job key gets a cap sized to the job and an expiry a few days out;
- a demo or tutorial key gets a tiny cap and a short expiry, and you assume it will be copied.
When a key is exposed
Do these in order, and do not wait to be sure:
- Disable the key from the keys page. Disabling stops it immediately and can be undone.
- Look at the activity page for calls you do not recognize, and compare them with the key's spend.
- Create a replacement with limits, deploy it, then delete the old key.
- Find out how it leaked. Check build logs, screenshots, browser code and shared notebooks, because the same mistake will leak the next key.
Never put a key in code that runs in a browser or a mobile app. Anyone can read it there. Call the API from a server you control and give your front end only your own session.
Teams: organization accounts
A shared personal account makes billing opaque and keys hard to attribute. An organization account is built for teams:
- Members belong to the organization with a role, and the roles decide who may create keys, who may use the organization playground and who may see organization-wide usage.
- Keys created inside an organization are billed to the organization's balance, not to the member's own account.
- When someone leaves, you remove the member and disable their keys, and nothing of the company's depends on their personal login.
Open the organizations page to create one, invite teammates and top up its balance. For the points and top-up rules themselves, see points and cost control.
A checklist before you ship
- No key is shared between two services.
- Every key has a spend cap.
- Temporary keys have an expiry.
- Keys that only need chat cannot call video.
- No key appears in front-end code, screenshots or a public repository.
- You know how to disable a key in under a minute.