Is the main goal to limit clients or generate revenue? To efficiently throttle clients without requiring trust, a small proof of work can be included in the payload. I previously created one for a major exchange, which resolved their spam issues. The API gateway can adjust the difficulty level based on global demand or the number of requests per IP.

1 sats \ 0 replies \ @k00b 3 Mar
  1. for PoW to discourage motivated spammers, the difficulty has to be high enough that it significantly affects UX for earnest users with low end hardware afaict (ht: adam back)
  2. API providers can't earn from PoW

Obviously, lightning payments are on par or worse UX than (1) right now, but there's at least some hope it can be improved. Lightning payments of this type are also more likely to be widely adopted given (2).

Selling anonymous API access [...]

I find that clear enough.

10 sats \ 1 replies \ @Majjin 3 Mar

I like this idea! But why not just request a valid ecash token as a part of the header? The first couple steps seem superfluous to me.

EDIT: Perhaps it lets you have a sort of authentication step. Instead of providing an API auth token, you have to successfully pay a LN invoice instead.

Lightning Service Authentication Token

Many people are already using this and probably don’t even realize it.