{
  "disclaimer": {
    "text": "Not investment advice.",
    "url": "https://agentpaywire.com/disclaimer.json"
  },
  "x402Version": 2,
  "protocol": "x402",
  "enabled": true,
  "default_rail": "L402",
  "rails": [
    {
      "protocol": "L402",
      "payment": "Lightning",
      "price_sats": 100,
      "credits": 100,
      "ttl_days": 30,
      "unit": "One credit is one paid request.",
      "challenge": "WWW-Authenticate",
      "authorization": "Authorization: L402 <macaroon>:<preimage>"
    },
    {
      "protocol": "x402",
      "price_usd": "0.01",
      "currency": "USDC",
      "network": "eip155:8453",
      "network_name": "Base",
      "credits": null,
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "pay_to": "0x7BB50FB9141A619961f1c29C4e0b539d60f29D20",
      "unit": "One request. No credits.",
      "challenge": "PAYMENT-REQUIRED",
      "pay": "PAYMENT-SIGNATURE",
      "v1_pay": "X-PAYMENT"
    }
  ],
  "price_usd": "0.01",
  "currency": "USDC",
  "credits": null,
  "network": "eip155:8453",
  "v1_network": "base",
  "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "pay_to": "0x7BB50FB9141A619961f1c29C4e0b539d60f29D20",
  "facilitator": "https://facilitator.payai.network",
  "note": "L402 is listed first: 100 sats for 100 credits over 30 days. x402 is 0.01 USDC per request on Base and does not sell credits. The files on https://agentpaywire.com stay free.",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "amount": "10000",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "payTo": "0x7BB50FB9141A619961f1c29C4e0b539d60f29D20",
      "maxTimeoutSeconds": 60,
      "extra": {
        "name": "USD Coin",
        "version": "2"
      }
    }
  ],
  "headers": {
    "required": "PAYMENT-REQUIRED",
    "pay": "PAYMENT-SIGNATURE",
    "v1_pay": "X-PAYMENT",
    "response": "PAYMENT-RESPONSE"
  },
  "resources": [
    "https://api.agentpaywire.com/v1/search",
    "https://api.agentpaywire.com/v1/updates",
    "https://api.agentpaywire.com/v1/digest",
    "https://api.agentpaywire.com/v1/changes"
  ],
  "examples": {
    "curl": "# x402 is the second rail. One request is 0.01 USDC on Base. No credits.\n# L402 is listed first on the same HTTP 402. Angle brackets are placeholders, not a signature or a key.\n# 1. Request with no payment header.\ncurl -i 'https://api.agentpaywire.com/v1/search?q=bitcoin'\n# HTTP/1.1 402\n# WWW-Authenticate: L402 macaroon=\"<macaroon>\", invoice=\"<bolt11>\"\n# PAYMENT-REQUIRED: <base64 PaymentRequired>\n# 2. Retry with PAYMENT-SIGNATURE. The header value is a base64 PaymentPayload.\ncurl -i 'https://api.agentpaywire.com/v1/search?q=bitcoin' \\\n  -H 'PAYMENT-SIGNATURE: <base64 PaymentPayload>'",
    "javascript": "// 0.01 USDC per request on Base. No credits. Do not commit a private key.\nimport { wrapFetchWithPayment, x402Client } from '@x402/fetch';\nimport { registerExactEvmScheme } from '@x402/evm/exact/client';\nimport { privateKeyToAccount } from 'viem/accounts';\n\nconst client = new x402Client();\nregisterExactEvmScheme(client, { signer: privateKeyToAccount(process.env.X402_PRIVATE_KEY) });\nconst pay = wrapFetchWithPayment(fetch, client);\nconst response = await pay(\"https://api.agentpaywire.com/v1/search?q=bitcoin\");\nconsole.log(response.status, response.headers.get('PAYMENT-RESPONSE'));\nconsole.log(await response.text());"
  },
  "free_data": "https://agentpaywire.com/api/index.json"
}
