I've noticed some non-KYC AI services that charge per question rather than using a subscription model. Some of these use Lightning Network for payments, providing an API key that gets debited with each use. Going even further, I've seen services that use Cashu, embedding the bearer token in the header to pay "truly" per query. I'm curious about how this works.
Cashu tokens aren't fixed keys and become unusable after a single use. Does this mean the header token needs to be replaced with each query?
Before a response is generated, it's impossible to know the exact cost of that query. What token is put in the header? And since the cost is unlikely to match the token's exact value, does this mean a token with a larger denomination is used, and the change is refunded somehow? Is the refund attached to the response?
@routstr #asknostr
Login to reply