
How it works in 30 seconds
Agent discovers your service
The agent calls
GET /discover to browse your pricing plans — plan IDs, USDC amounts, and your wallet address. No payment yet.Agent pays on-chain
The agent signs an EIP-3009 authorization off-chain (no gas required on their side). Key0’s gas wallet executes the USDC transfer on Base.
Unfamiliar with terms like EIP-3009, x402, AccessGrant, or ChallengeEngine? Read Core Concepts for plain-English definitions before continuing.
Why Key0
AI agents cannot fill out signup forms, enter credit cards, or navigate dashboards to get API keys. They need a machine-native way to discover, pay for, and access services. Key0 solves this by embedding the entire payment-and-access flow directly into your API:- An agent discovers your service and its pricing (via A2A agent card or MCP tool).
- It pays on-chain in USDC — one transaction, no intermediary.
- It receives a signed JWT and calls your protected endpoints.
Value props
No Signup Walls
Agents discover your service and pay automatically — no API key portals, no signup forms, no human in the loop.
Open Source & Self-Hostable
Every part of the payment flow is auditable and customizable. Run it as an npm package embedded in your app, or as a standalone Docker container from
key0ai/key0 on Docker Hub.Automatic Refunds
If credential delivery fails after payment, Key0 settles a refund on-chain automatically. No manual intervention required.
Supported agent environments
Key0 works with any agent that can make HTTP requests. It has been tested with:- Claude Code — Anthropic’s CLI agent
- OpenClaw — open-source agent framework
- Cursor — AI-powered IDE
Protocols
HTTP / REST
Standard x402 payment flow over HTTP. Any HTTP client can participate.
MCP
Model Context Protocol integration. Agents discover plans and pay via MCP tools
over Streamable HTTP transport.
A2A
Google’s Agent-to-Agent protocol. A2A task lifecycle with x402 payment
metadata built in.
Payment rails
Today: USDC on Base (mainnet and Base Sepolia testnet) via the x402 protocol. On-chain, instant, non-custodial.
Coming soon: Visa, Mastercard, and UPI support — so agents can pay with traditional rails when on-chain is not an option.
Install
Next steps
Quickstart: Embedded
Add Key0 to an existing Express, Hono, or Fastify server in under 5 minutes.
Quickstart: Standalone
Run Key0 as a standalone Docker service that sits alongside your API.
Core Concepts
Plain-English definitions of every Key0 term — read this before diving in.
Paying for Access
For agents and buyers: how to discover, pay, and call a Key0-protected API.
