API Keys
Create, rotate, and revoke CanalAPI API keys, plus per-key IP allowlist, model allowlist, quota, and expiration.
API keys authenticate protected inference requests. Each key belongs to one account and can have its own access scope, spending cap, and expiration for separate applications and environments. The public model catalog does not validate keys.
Create a key
- Open API Keys in the dashboard.
- Click Create API Key.
- Enter a purpose name, such as
local-codexorserver-api-prod. - Optionally set the Lifetime spend limit (USD) and Expiration. These settings do not add credit to the account.
- Click Create key.

Screenshot of a local test-user view. The name, USD 5 cap, and 30-day expiry are examples; choose values for your actual needs.
Copy the key immediately — the full secret is shown only once and cannot be recovered after the dialog closes. The server stores only a hash of the key.

Screenshot of a local test-user view. The key was masked before capture and account details are excluded. Copy the complete key when creating your own; the dots shown here are not a usable key.
Use your new key
Choose Claude Code, Codex, or the API quickstart. After one minimal request, verify the model and usage in usage logs. For failures, use connection troubleshooting.
Access scope and quota
The current creation dialog offers a name, lifetime spend limit, and expiration. The list supports editing the spending cap, enabling/disabling, and deleting a key. The table also explains model and IP restrictions that may apply. If you need to change these restrictions and no control is available, contact support rather than treating them as required creation fields.
| Control | Purpose |
|---|---|
| Model allowlist | Only allow calls to listed models; everything else returns 403 Forbidden |
| IP allowlist | Restrict callers by IP / CIDR; out-of-range requests return 401 |
| Quota cap | Total USD this key may spend; once reached, the key is paused (account balance is unaffected) |
| Expiration | Auto-expires the key after the configured date |
| Status | Enabled / disabled (disabled keys reject auth immediately but keep their metadata) |
These controls are key-level. Account-wide quotas and subscription quotas are aggregated at the account level — see Subscriptions and Rate Limits.
Typical configurations
| Scenario | Suggested settings |
|---|---|
| Production web service | Model allowlist: just the 1–3 models you use; IP allowlist: server egress IPs; no expiration |
| CI job | Quota cap: enough for a month of builds; expiration: 6 months; IP allowlist: CI runner IPs |
| Temporary local debugging | Quota cap: low (e.g. $5); expiration: 30 days |
| Partner integration | Strict model and IP allowlists; quota cap per contract |
Edit / rotate / revoke
Edit
Click the edit icon beside Lifetime spend limit in the list to adjust or remove this key's cap. It is cumulative, not monthly; raising it does not erase previous spending. This dialog does not offer general edits to the name or model scope.
Rotate
Rotate keys periodically, or immediately whenever a key may have been exposed:
- Create a new key (mirror the old key's access scope).
- Update your application to use the new key.
- Confirm migration via Usage Logs.
- Revoke the old key.
Revoke
Use Disable for a temporary pause and enable the key again when needed. To revoke it permanently, choose Delete and confirm. The deleted key can no longer authenticate and its plaintext cannot be recovered. Switch applications to a replacement first.
List view
- Name and masked key prefix, not a usable full key
- Call count, cumulative spending, and lifetime spend limit
- Last use, expiration, and status
- Edit-cap, enable/disable, and delete actions
Best practices
- One purpose per key. Use separate keys per service, environment, or CI job — revocation and billing attribution become surgical.
- Server-side only. Never embed a key in browser JavaScript or a mobile app. Use a backend proxy.
- Combine with a quota cap. Even if a key leaks, the cap limits the damage.
- Combine with an IP allowlist. An allowlist adds a source restriction when your server egress is fixed; a changed egress IP can block legitimate requests.
- Use secret managers. Inject the key via Vercel / Railway env vars, AWS Secrets Manager, Doppler, etc. — never check it in.
- Monitor usage. Check Usage Logs regularly for unexpected spikes.
If a key is leaked, revoke immediately, then review the relevant time range in Usage Logs for suspicious activity. If unauthorized charges occurred, raise a ticket via Support.