zkAPI: Private Usage Credits for Any API
A new system called zkAPI has been introduced to provide private usage credits for any API. Developed by The Open Anonymity Project in collaboration with the Ethereum Foundation, zkAPI allows users to pay for metered APIs without revealing their identity. This is achieved through zero-knowledge proofs, which enable the server to verify that a payment exists without learning who made it.
The current system of using API keys and payment methods can reveal sensitive information about users' activities, such as health-related or financial queries. zkAPI separates payment from identity, allowing users to deposit credits into an Ethereum vault and authorize spending with zero-knowledge proofs. This way, the provider sees only the requests, while the payment layer sees only the spend.
zkAPI uses two pieces of cryptography: commitments in a Merkle tree and nullifiers derived from the note's secret. These ensure that deposits are secure and unlinkable, even if a user tries to spend the same balance twice.