An API key is the only way into the paid API. It identifies the account whose Gateway balance a request is charged against — there is no anonymous path to buy inference here, and a session cookie will not work on /v1.

Creating one

app.nanorouter.ai/keysCreate key. The plaintext key is shown once, at creation. The router stores only a hash of it, so a key that is lost is replaced, not recovered. After that, all you ever see is the prefix — enough to tell two keys apart in a list, not enough to use.

Spending limits

Give a key a limit and it will refuse a request whose quote would exceed the remaining allowance:
Two things about how the limit is enforced are worth knowing before you set one tightly:
Concurrent requests are each checked against the same remaining allowance, because none of them has settled yet. Under real concurrency a key can therefore overshoot its limit by roughly the size of the requests in flight.
A turn that settles above its quote — a searching turn, typically — can carry the key past the cap, after which it refuses everything until you raise the limit. The resulting debt is not lost; it is collected by whichever key the account next spends on.
This is deliberate. The limit is a budget guard you set for yourself, not a solvency check — what you can actually spend is bounded by your Gateway balance, and that is enforced exactly, under a lock. Making the per-key cap exact would mean taking a lock on the key for every single request. Set the limit with headroom, and treat it as a circuit breaker rather than a precise budget.

Expiry

A key can be given an expiry date at creation or later. An expired key is a 401, the same as an unknown one. Worth setting on anything you hand to a third party, a CI job, or a demo.

Per-key usage

The keys page shows spend per key, so you can tell which agent or environment is costing you money without correlating request ids by hand.

Revoking

Delete a key and it stops working immediately. In-flight requests already authorized against it will finish and settle — the charge was signed before the key was revoked, and the ledger has to close.

Practical setup

One key per environment

Separate dev, staging, and production. Revoking a leaked dev key should not take production down with it.

Limit + expiry on anything unattended

An agent in a loop is the thing most likely to spend $40 overnight on a bug you would have caught in the morning.

Never ship a key to a browser

A nr_ key spends real money from your balance. Proxy through your own backend.

Rotate on suspicion, not on schedule

Creation is instant and free; there is no reason to wait.