Introducing zkAPI: private usage credits for any API - ethereum.org

Introducing zkAPI: Private Usage Credits for Any API

Posted by Vittorio Rivabella, dAI Team on October 1, 2026

Research & Development

zkAPI allows you to pay for an API usage without revealing your identity. Deposit credits once into an Ethereum vault, then authorize bounded usage with zero-knowledge proofs instead of providing an identity. The provider sees the requests, while the payment layer only sees the spend. Neither learns the connection between them.

The Open Anonymity Project, in collaboration with the Ethereum Foundation, has launched zkAPI on Ethereum Mainnet today.

The Problem

Every AI API call today carries an identity. Your API key is linked to an account, the account to a payment method, and every prompt you send creates a record attached to both. This allows the provider to connect years of your usage into a single profile.

Prompts are personal, revealing details about your health, finances, and doubts. The current model requires handing over a transcript of your thinking to whoever handles the billing. The alternatives are limited: on-chain payments are slow, expensive, and traceable, or trust a third party not to look.

The Idea

zkAPI separates payment from identity. Deposit credits (ETH, USDC, etc.) into a vault contract in one transaction. Your balance is then a private note, a form of digital cash that only you can spend and that no one can trace back to the deposit.

To authorize spending, software on your device generates a zero-knowledge proof stating that a funded note covers the spend and has not been used before. One proof can cover a single request or an entire session. The server verifies the statement without learning which note, deposit, or user it belongs to. At the payment layer, requests are not linked to you, and they are not linked to each other.

Two cryptographic elements ensure security and privacy:

  • Merkle Tree Commitments: Deposits are stored as commitments in a Merkle tree, allowing a proof to show that a note is valid without revealing its specific identity.
  • Nullifiers: Every spend publishes a nullifier, a one-way serial number derived from the note's secret. Using the same note twice generates a duplicate nullifier, exposing the attempt.

How it Works

The payment and conversation paths both utilize a short-lived key and a usage receipt.

  • Payment Path (Steps 1-3): The client sends a proof of payment to the zkAPI server, revealing no prompts or identity. The server checks the proof and mints a fresh, short-lived API key capped in dollars.
  • Conversation Path (Step 4): Your prompts are sent directly to the AI provider using this key. Upon key expiration, the server charges your private balance for the metered usage.

The spending cap acts as a reservation. The provider records the key's total usage in a signed receipt, and the server deducts this amount from your note. Once the bill is settled, neither side can change it.

zkAPI also offers a simpler proxy mode where the zkAPI server relays requests to the provider directly.

Leave a Reply