For buyers
Access 160+ APIs through cn2.ai without signing up, managing API keys, or setting up billing accounts. Pay per request using MPP (Tempo USDC, Stripe cards, Lightning) or x402 (USDC on Base).
How it works
- Change the base URL. Replace your provider's base URL with the cn2.ai equivalent. For example, change
api.openai.comtoopenai.cn2.ai. The rest of the API path and request body stays the same. - First request returns 402. cn2.ai responds with HTTP 402 (Payment Required) and a
WWW-Authenticateheader containing a payment challenge with the price and accepted payment methods. - Pay and retry. Your client pays the challenge amount (via Stripe card, Tempo USDC, or Lightning) and retries the request with a payment credential in the
Authorizationheader. - Get the response. cn2.ai verifies payment, routes your request through a seller's key, and returns the upstream response along with a
Payment-Receiptheader.
No account required
Anonymous access works natively. You do not need to create an account, generate an API key, or set up billing. MPP handles authentication and payment in a single HTTP round-trip.
Optionally, you can create an account to get: 30-day request history, receipt archive, monthly spend caps, and a default payment method.
Automatic failover
If the seller key that your request is routed to fails (rate limited, revoked, or upstream error), cn2.ai automatically retries on another seller's key. You never see the error — from your perspective, the request simply succeeds. If all available keys fail, you receive a 502 response.
Premium routing
For lower latency and higher reliability, add the header X-CN2-Pool: premium to your request. Premium pool keys have a verified track record of high uptime and low error rates. Premium requests cost 25% more.
Evaluate providers
Before committing to a provider, use these tools to explore pricing, performance, and the 402 payment flow:
- Playground — send live requests, inspect 402 challenges and response bodies. Defaults to the testing provider so you can see a real 200 response (
/health) and a full 402 challenge (/echo) without spending anything. - Compare providers — side-by-side comparison of latency, uptime, pricing, and shared routes.
- Marketplace — browse all providers with live stats. Click any provider for a detail page with routes, code examples, and discovery links.
Guides
- Quickstart → Make your first paid API call
- Disputes → What to do if you were charged incorrectly
- How payments work → Deep dive into the MPP payment flow