API keys
A key runs under the routing policy attached to it, else the project default, else the organization default, else the Inferbase default. A key carries no routing settings of its own; a request that sets model_pool, optimize_mode, preset, or auto_scope on a key is refused.
Creating, updating, and revoking keys require a signed-in session. An inf_ key cannot manage keys, so a leaked key cannot mint another or revoke yours. Listing works with either.
Create a key
| Method and path | POST /keys |
| Purpose | Create a key, optionally under a routing policy. The secret is returned once. |
| Authentication | Session only |
| Field | Meaning |
|---|---|
name | For you. Shown in Logs and Usage. |
project_id | The project the key belongs to. Defaults to the active project. |
policy_id | The routing policy to run under. Omit to inherit the default. |
rate_limit_rpm | Optional requests per minute. |
spend_cap_monthly_usd | Optional monthly spend cap. |
expires_at | Optional expiry. |
{"name": "Production", "policy_id": "6d1c1f2e-0b7a-4c3e-9f1a-2b3c4d5e6f70"}The response carries key, the full secret, once. Store it; only key_prefix is shown afterwards.
List keys
| Method and path | GET /keys |
| Purpose | Your keys with the policy each runs under. Prefixes only. Scoped to the active project unless all_projects=true, which owners and admins may pass. |
| Authentication | API key or session |
Update a key
| Method and path | PATCH /keys/{key_id} |
| Purpose | Change the name, the limits, or the routing policy. policy_id: null detaches the policy. |
| Authentication | Session only |
Revoke a key
| Method and path | DELETE /keys/{key_id} |
| Purpose | Revoke the key. Cannot be undone. |
| Authentication | Session only |
Rotation, which issues a new secret while the old one keeps working for 24 hours, is done in the portal under Gateway › API keys.
Credits and usage
| Method and path | Purpose | Authentication |
|---|---|---|
GET /credits | The organization's current balance. | API key or session |
GET /credits/transactions | Changes to the balance: top-ups, usage deductions, the welcome credit, and adjustments. | API key or session |
GET /usage | Usage logs with model, tokens, cost, latency, and status. | API key or session |
The same data is shown under Observability › Usage and Settings › Billing.
Last updated September 10, 2026.