# API key controls

Manage keys in the console; `GET /v1/key` is the read-only self-inspection API. Every key has an immutable ID, display name, masked secret, status, creation time, optional expiry, spending allowance, and usage attribution.

The account balance and key allowance must both cover a request. Outstanding holds count against both, so parallel calls cannot overspend by checking stale totals. Unlimited key allowance still requires account funds. Lowering a cap below occupied allowance prevents new work; it does not erase prior spend or cancel accepted tasks.

Pause rejects new calls and can be reversed. Revoke rejects new calls permanently. An expired key cannot call the API even if its owner has money. Existing tasks continue and retain the submitting key ID. A replacement key starts a distinct usage history.

Playground authenticates through the signed-in session, shown separately as source `playground`; it never exposes or requires a user's permanent key. Account charts aggregate Playground and external API usage. Filtered key charts show only that key; archived/revoked keys remain available in historical filters.

The server returns the plaintext secret once; subsequent views cannot recover it.

[Authentication](/docs?page=auth&lang=en) · [Billing](/docs?page=billing&lang=en)

## Restriction fields

Each key selects one spending cap and one period: lifetime, daily, weekly, or monthly. You may edit the period; the applicable settled spend is recalculated from the current period, without deleting history. Daily, weekly and monthly periods reset at UTC midnight, Monday 00:00 UTC and the first day of the month 00:00 UTC. All outstanding holds count toward the active cap, including holds accepted before a period boundary, so in-flight work does not bypass a newly reset limit. Upon settlement, spend belongs to its request acceptance time; lifetime includes all history. Model allowlists, RPM and IPv4/IPv6 addresses and CIDR allowlists add independent gates. An empty model/IP allowlist means unrestricted; the UI labels that explicitly. Both address families are supported. Account platform ceilings still apply. Remaining key allowance is not account balance. Service enforcement requires correctly configured proxy trust in production.

GET /v1/key returns id, name, mask, enabled, revoked, limit, period, expiresAt, models, rpm, ips, spent, reserved and nextReset. Key monetary fields use USD numbers. limit=null means no key spending cap; limit=0 permits no positive spending. Account balance still applies. No secret is returned.
