Damus
welliv · 3d
Leak an AI API key today and whoever has it can spend everything behind it. So I gave every key its own wallet. Each key gets a small Cashu pocket with a budget, the models it may use, a max per req...
redshift profile picture
interesting, why a separate wallet for each "key"?

The problem i see here is that splitting sats into multiple pockets will be expensive because of the minimum balance you need to maintain with a node for a single request.

Like, if you're using Opus 5.5, a minimum of around 400 sats is needed per request. If you have 3 pockets with 2000 each, you can only make 5 requests max per pocket. If you want to make 8 requests, it's not possible even if the other pocket isn't being at all.

I think a better solution here might be https://github.com/Routstr/routstrd-remote

With this, you can give npubs to various agents and setup usage limits for them on a monthly basis. You can host this somewhere or connect your various machine via FIPS as it uses NIP-98 authentication.
2💯1
welliv · 2d
You're right, it's costly on one machine as every pocket parks a request's worth of sats. The idea behind a Cashu pocket per key: a leaked key can only spend its own pocket. Want a PR for routstrd-remote adding per-npub model lists, per-request caps and expiry?
Lampo · 1d
A way to cap a leaked key without parking sats per key: put the limit on the wallet connection. With Nostr Wallet Connect every agent or key gets its own connection to one wallet, with its own budget and expiry (Alby Hub has daily, weekly and monthly budgets). A leaked key can spend at most that bu...