Discover, test, and integrate paid APIs with crypto micropayments. No subscriptions, no API keys — just pay per call.
Find the perfect API for your needs
Simple integration with automatic payment handling
// Install: npm install @x402/fetch @x402/evm viem
import { x402Client, wrapFetchWithPayment } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Create a payment-enabled fetch
const signer = privateKeyToAccount(process.env.PRIVATE_KEY);
const client = new x402Client();
registerExactEvmScheme(client, { signer });
const fetchWithPayment = wrapFetchWithPayment(fetch, client);
// Call any x402 endpoint - payment is automatic!
const response = await fetchWithPayment("https://gg402.vercel.app/book_summary", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ title: "The Great Gatsby" })
});
const data = await response.json();
console.log(data);
Monetize your endpoints with the x402 protocol