/v1.
Creating one
app.nanorouter.ai/keys → Create 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:It is measured against settled spend, not against quotes in flight
It is measured against settled spend, not against quotes in flight
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 single overrun can push a key past its own limit
A single overrun can push a key past its own limit
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.
Expiry
A key can be given an expiry date at creation or later. An expired key is a401, 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.