
Sell anything to AI agents
Key0 is a TypeScript SDK that turns any API into a paid, agent-accessible service. Drop it into your Express, Hono, Fastify, or MCP server — agents discover your pricing, pay in USDC on Base via the x402 protocol, and get access. No signup walls, no API key portals, no proxying.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
Zero Proxying
Key0 runs inside your server process. Agent traffic hits your API directly — no
third-party relay, no added latency, no data leaving your infrastructure.
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. JSON-RPC based discovery and task execution
with payment 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.
How It Works
Understand the two-phase payment flow and challenge lifecycle.
Two Modes
Learn the difference between embedded and standalone deployment modes.
