Skip to main content
Glama

x402_network_info

Lists all available APIs in the x402 API Network with details on pricing, status, and capabilities. This free tool helps users discover pay-per-use APIs that accept USDC micropayments on Base network.

Instructions

List all APIs in the x402 API Network with pricing, status, and capabilities. This tool is FREE — no payment required.

The x402 API Network provides pay-per-use APIs accepting USDC micropayments on Base (L2 Ethereum).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation of the `x402_network_info` tool, which queries the status of various APIs in the x402 network and returns their health, pricing, and configuration status.
    // ─── Tool: x402_network_info (FREE) ─────────────────────────────────────────
    
    server.tool(
      "x402_network_info",
      `List all APIs in the x402 API Network with pricing, status, and capabilities.
    This tool is FREE — no payment required.
    
    The x402 API Network provides pay-per-use APIs accepting USDC micropayments on Base (L2 Ethereum).`,
      {},
      async () => {
        const walletConfigured = !!PRIVATE_KEY;
        const healthChecks = await Promise.allSettled(
          Object.entries(APIS).map(async ([key, api]) => {
            const health = await checkHealth(api.baseUrl);
            return { key, ...api, ...health };
          })
        );
    
        const results = healthChecks.map((r) => {
          if (r.status === "fulfilled") return r.value;
          return {
            key: "unknown",
            name: "Unknown",
            healthy: false,
            error: "Check failed",
          };
        });
    
        return textResult({
          network: "x402 API Network",
          blockchain: "Base (L2 Ethereum)",
          token: "USDC",
          wallet_configured: walletConfigured,
          payment_mode: walletConfigured
            ? "Automatic x402 payments enabled"
            : "Free test endpoints only — set X402_PRIVATE_KEY for paid access",
          apis: results.map((r: any) => ({
            id: r.key,
            name: r.name,
            status: r.healthy ? "online" : "offline",
            price: r.price,
            description: r.description,
            base_url: r.baseUrl,
            error: r.healthy ? undefined : r.error,
          })),
        });
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jameswilliamwisdom/x402-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server