Skip to main content
Key0

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.
npm install @key0ai/key0

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:
  1. An agent discovers your service and its pricing (via A2A agent card or MCP tool).
  2. It pays on-chain in USDC — one transaction, no intermediary.
  3. It receives a signed JWT and calls your protected endpoints.
No proxy sits between the agent and your API. You keep full control of your infrastructure.

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

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

npm install @key0ai/key0

Next steps