zkAPI Is Live: Pay for AI and Web3 Services Without Revealing Your Identity

A new system that reimagines privacy for on-chain service payments is now operational. Developed by the Ethereum Foundation in collaboration with the Open Anonymity Project, zkAPI is running on the Ethereum mainnet. Its core proposition is to decouple payment from identity, allowing users to access metered services without the privacy trade-offs typical of today's models.

How zkAPI Works: Anonymous Spending in Three Steps

The process begins when a user deposits assets like ETH or USDC into an on-chain vault contract, creating an anonymous prepaid balance.

When needing to call an AI API, the user's device locally generates a zero-knowledge proof. This proof communicates only two essential facts to the server: first, that the user's anonymous vault holds sufficient funds for the request, and second, that the specific credential authorizing this spend is being used for the first time, preventing double-spending. Upon verification, the server issues a temporary API key with set limits and an expiration.

A Dual-Layer Privacy Shield

The user then sends requests directly to the AI service provider using this temporary key. This establishes a dual-layer privacy barrier:

  • For the Service Provider: They see the request content (e.g., the user's prompt) and deliver the AI inference, but they cannot identify who is paying for it.
  • For the Payment Layer: It sees that an anonymous spend occurred and for what amount, but cannot link that transaction to any specific API request or user identity.

After service completion, the provider records the actual resource usage and generates a signed receipt. The system finally deducts the corresponding cost from the user's initial private balance. On the Ethereum blockchain, only high-level operations like deposits, batch settlements, and withdrawals are recorded; the link between individual spends and specific services remains off-chain.

Technical Foundation and Broader Applications

zkAPI is built on established cryptographic components including the Groth16 zk-SNARK system, the BN254 elliptic curve, the Poseidon hash function, and Merkle trees. The design prioritizes reliability: users can withdraw remaining funds directly from the chain-based contract even if the operational server fails.

While the initial use case focuses on AI inference—given the potentially sensitive nature of user prompts in health, finance, etc.—the protocol's potential is broader. It is applicable to any Web3 service with a pay-per-use model, such as blockchain RPC calls or cloud-based image and video generation services.

The launch of zkAPI represents a significant step towards enabling complex, privacy-preserving commercial logic on public blockchains, providing crucial payment privacy infrastructure for the next wave of decentralized applications.