Skip to main content
A key is how your agent calls Naive. In a developer workspace every key has a preset (what it may do), an expiry and a budget (how much it may spend). Keys carry no approval rules; those live on the identity. Create, rotate and revoke keys in the console under Connect, or with the API below. Managing keys needs the admin scope (an admin key, or a signed-in owner or admin).

Presets

The new grants: You can still pass explicit scopes instead of a preset. A key’s response keeps the legacy scopes field (the original 15 values only, so older SDKs parse it) and adds grants, the full list including the new values. A key whose grants are only the new ones is refused on routes outside them, except GET /v1/me, the model list and organization reads.

Create a key

POST /v1/api_keys — scope admin.
string
required
A label, e.g. research-agent.
string
full, tools, tools_resources or read.
string[]
Explicit grants instead of a preset.
string | null
When the key stops working. Developer workspaces default to 90 days from now; null means never.
object | null
{ cap_micro_usd, period } with period one of day, month, total. Developer workspaces require one and default to $20 a day.
string
What the key is for.
The reply carries the secret once. Store it then; no read ever returns it.

Read a key

GET /v1/api_keys lists keys. GET /v1/api_keys/{id} reads one, with spent_micro_usd for the current budget period, calls_24h and pending_approvals. Each key shows grants, preset, description, expires_at, budget ({ cap_micro_usd, period, spent_micro_usd }) and created_via (developers, cli, api or studio).

Update a key

PATCH /v1/api_keys/{id} — scope admin. Change name, description, scopes, preset, expires_at or budget. A key or MCP connection may only narrow a key (fewer grants, an earlier expiry, a lower budget); widening needs a signed-in person.

Rotate a key

POST /v1/api_keys/{id}/rotate — scope admin. Mints a new secret under the same id.
integer
Keep the old secret working for this long, up to 604800 (7 days). Default 0: the old secret stops at once, as before.

Revoke a key

DELETE /v1/api_keys/{id}. The key stops working immediately.

Budgets

A key’s budget is checked before every paid call: tool runs, data and social-data runs, media, and the funded resource actions. When the key’s spend in the current period has reached its cap, the call is refused with 402 budget_exceeded and nothing is charged. The day period resets at midnight UTC; month on the first of the month; total never. The workspace also has a daily cap (default $50 a day across all keys), changed by an owner in Settings. It is checked the same way.

From the CLI