HTTP 402 Payment Required

API Marketplace for the x402 Protocol

Discover, test, and integrate paid APIs with crypto micropayments. No subscriptions, no API keys — just pay per call.

Endpoints
Searchable
$0.001
Starting price

Get Started in Minutes

Simple integration with automatic payment handling

📄 JavaScript / Node.js
// 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);

Add Your API

Monetize your endpoints with the x402 protocol

🔌 API $0.25 per registration

Register endpoints programmatically:

POST https://gg402.vercel.app/x402/register
View full code example
// 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";

// Setup (Base Mainnet)
const signer = privateKeyToAccount(process.env.PRIVATE_KEY);
const client = new x402Client();
registerExactEvmScheme(client, { signer });
const fetchWithPayment = wrapFetchWithPayment(fetch, client);

// Register an endpoint to x402 marketplace ($0.25)
const response = await fetchWithPayment("https://gg402.vercel.app/x402/register", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    url: "https://api.example.com/my-endpoint",
    method: "POST",
    price: "$0.01",
    network: "eip155:8453",  // Base Mainnet
    description: "Generate custom images from text prompts",
    inputSchema: {
      prompt: { type: "string", required: true }
    },
    outputSchema: {
      imageUrl: { type: "string" },
      success: { type: "boolean" }
    }
  })
});

const data = await response.json();
console.log(data);
// { success: true, endpoint: { key, url, price }, x402scan: { registered: true } }
The full URL of your x402-enabled endpoint
🔒 Stored encrypted. Required if your upstream API needs authentication
Paste a curl command to auto-detect endpoint settings and API keys
Paste your OpenAPI/Swagger spec for better documentation