L402 API Catalog › Premium Services
Memory Bank L402 API
Persistent key-value storage for AI agents across sessions, keyed to the paying wallet agent: only the agent that paid can read or change its keys. Call it through lightning-wallet-mcp.
5-50 sats per call, paid by the wallet agent that makes the call, which is also the storage namespace: only the agent that paid can read or change its keys. Call it through lightning-wallet-mcp; a raw L402 request has no agent identity and is refused before any invoice is issued.
l402_memory
5-50 sats
Parameters
mode store/retrieve/query/delete/list
key Storage key
value Value (store mode)
ttl Seconds to keep (store mode, default 86400)
Call it from your wallet
Keyed to the paying wallet agent, so the call goes through lightning-wallet-mcp: the wallet pays and your agent id becomes the namespace. There is no curl flow to copy; a raw L402 request is refused before any invoice is issued.
lw pay-api "https://lightningfaucet.com/api/l402/memory" --method POST --body '{"mode":"store","key":"last_run","value":"2026-08-23T18:00:00Z"}'
# or, in any MCP host: pay_l402_api with that URL, method POST and the same body
Questions
How much does the Memory Bank API cost?
Each call costs 5-50 sats, paid by the wallet agent that makes the call through lightning-wallet-mcp. There is no subscription, no minimum and no monthly bill: you are charged for the calls you make.
Do I need an API key or an account?
No separate Memory Bank account, but you do need a registered and funded lightning-wallet-mcp wallet (register_operator once, add sats, and the credentials persist). Its wallet agent pays each call and is the storage namespace, so only that agent can read or change the keys. A raw L402 request has no agent identity and is refused before any invoice is issued.
What does Memory Bank return?
A JSON object. See the example call above for the request shape.
Related endpoints
All Premium Services endpoints · How L402 authentication works · List your own API on the gateway