{
  "openapi": "3.1.0",
  "info": {
    "title": "Agent Paywire API",
    "version": "1.0.0",
    "summary": "Paid convenience API. L402 over Lightning.",
    "description": "Not investment advice (https://agentpaywire.com/disclaimer.json). Two rails on the paid routes. L402 is listed first: 100 sats buys 100 credits for 30 days. x402 is 0.01 USDC per request on Base One x402 payment buys one call. Packs are POST /v1/credits using x402 or L402. The files on https://agentpaywire.com stay free. A request with neither credential gets HTTP 402. GET /v1/changes does the same unless the client opts in with header X-APW-Trial: 1 or query trial=1, which serves 5 unpaid calls per client per rolling 24 hours first. HEAD and a directory-probe User-Agent stay on HTTP 402. A feedback or review cap is HTTP 429 with Retry-After. A wallet rate limit stays HTTP 503. An unpaid HTTP 402 for GET /v1/search, GET /v1/digest, GET /v1/changes, and GET /v1/updates includes an Unpaid preview. Search returns at most two results with title, url, and date. Digest returns a headline count and the first two titles. Changes and updates return a count and the first three ids and titles. The full fields stay on the paid response. Listing in the library is free. Payment never affects inclusion, ranking, or order. Paid verification only attaches a verification object to an entry that is already listed. POST /v1/verify is 1000 sats or 1.00 USD. GET or POST /v1/check is 50 sats or 0.05 USD after 2 free reports per client per 24 hours. POST /v1/alerts is 2000 sats or 2.00 USD for 30 days. POST /v1/credits is 120 sats or 0.12 USD for 15 calls, 800 sats or 0.80 USD for 100 calls, or 7000 sats or 7.00 USD for 1000 calls, valid 90 days. A prepaid bearer token from POST /v1/credits spends one call, unweighted, on GET /v1/search, GET /v1/updates, GET /v1/digest, GET /v1/changes, POST /v1/verify, GET or POST /v1/check, or POST /v1/alerts. It cannot buy another pack. The list prices above stay for L402 and x402. Price list: https://agentpaywire.com/pricing.json. Privacy: https://agentpaywire.com/privacy/.",
    "termsOfService": "https://agentpaywire.com/terms/",
    "contact": {
      "email": "agentpaywire@gmail.com",
      "url": "https://agentpaywire.com"
    },
    "x-guidance": "How to pay: call a paid URL with no Authorization header, read the HTTP 402 response, pay the BOLT11 invoice from the WWW-Authenticate challenge (L402 macaroon=\"<macaroon>\", invoice=\"<bolt11>\"), and retry with Authorization: L402 <macaroon>:<preimage>. The macaroon is base64 and the preimage is hex. 100 sats buys 100 credits, valid 30 days. One credit is one paid call. The files on https://agentpaywire.com stay free. The Machine Payments Protocol discovery draft does not define an L402 method identifier, so offers[].method is the lowercase string l402. The HTTP 402 challenge is authoritative. A feedback or review cap is HTTP 429 with Retry-After. A wallet rate limit is HTTP 503 with Retry-After. An unpaid HTTP 402 for GET /v1/search, GET /v1/digest, GET /v1/changes, and GET /v1/updates includes an Unpaid preview. Search returns at most two results with title, url, and date. Digest returns a headline count and the first two titles. Changes and updates return a count and the first three ids and titles. The full fields stay on the paid response. x402 is a second rail on the same 402. L402 is listed first. PAYMENT-REQUIRED lists exact USDC of 0.01 dollars per request on Base (10000 atomic units on eip155:8453) One x402 payment buys one call. Packs are POST /v1/credits using x402 or L402. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
  },
  "servers": [
    {
      "url": "https://api.agentpaywire.com"
    }
  ],
  "x-service-info": {
    "categories": [
      "payments",
      "reference"
    ],
    "docs": {
      "homepage": "https://agentpaywire.com/",
      "apiReference": "https://agentpaywire.com/agents/",
      "llms": "https://agentpaywire.com/llms.txt",
      "terms": "https://agentpaywire.com/terms/",
      "privacy": "https://agentpaywire.com/privacy/",
      "subprocessors": "https://agentpaywire.com/subprocessors/",
      "agentCard": "https://agentpaywire.com/.well-known/agent-card.json",
      "aiPlugin": "https://api.agentpaywire.com/.well-known/ai-plugin.json",
      "agentsJson": "https://api.agentpaywire.com/.well-known/agents.json",
      "mcp": "https://mcp.agentpaywire.com/.well-known/mcp.json",
      "x402": "https://api.agentpaywire.com/.well-known/x402"
    }
  },
  "x-agentpaywire-authorization": "Authorization: L402 <macaroon>:<preimage>",
  "x-agentpaywire-rate-limit": "POST /v1/feedback allows 10 reports per client per hour and 500 per UTC day. POST /v1/reviews allows 10 reviews per payer per hour and 500 per UTC day. Over either cap is HTTP 429 with Retry-After. A wallet rate limit is HTTP 503 with Retry-After.",
  "x-agentpaywire-errors": [
    {
      "status": 400,
      "code": "since_required"
    },
    {
      "status": 400,
      "code": "until_invalid"
    },
    {
      "status": 400,
      "code": "type_invalid"
    },
    {
      "status": 400,
      "code": "format_invalid"
    },
    {
      "status": 400,
      "code": "status_invalid"
    },
    {
      "status": 400,
      "code": "feedback_invalid"
    },
    {
      "status": 400,
      "code": "feedback_too_large"
    },
    {
      "status": 400,
      "code": "feedback_urls_only"
    },
    {
      "status": 400,
      "code": "feedback_duplicate"
    },
    {
      "status": 400,
      "code": "review_invalid"
    },
    {
      "status": 400,
      "code": "review_too_large"
    },
    {
      "status": 400,
      "code": "review_signature"
    },
    {
      "status": 400,
      "code": "review_proof"
    },
    {
      "status": 400,
      "code": "review_unsettled"
    },
    {
      "status": 400,
      "code": "review_route"
    },
    {
      "status": 400,
      "code": "review_proof_used"
    },
    {
      "status": 401,
      "code": "invalid_macaroon"
    },
    {
      "status": 401,
      "code": "export_unauthorized"
    },
    {
      "status": 402,
      "code": "payment_required"
    },
    {
      "status": 402,
      "code": "token_expired"
    },
    {
      "status": 402,
      "code": "payment_not_settled"
    },
    {
      "status": 402,
      "code": "token_spent"
    },
    {
      "status": 404,
      "code": "not_found"
    },
    {
      "status": 405,
      "code": "method_not_allowed"
    },
    {
      "status": 500,
      "code": "token_store"
    },
    {
      "status": 500,
      "code": "misconfigured"
    },
    {
      "status": 502,
      "code": "upstream_unavailable"
    },
    {
      "status": 503,
      "code": "signing_key_missing"
    },
    {
      "status": 503,
      "code": "rate_limited"
    },
    {
      "status": 429,
      "code": "feedback_rate_limited"
    },
    {
      "status": 503,
      "code": "feedback_store"
    },
    {
      "status": 429,
      "code": "review_rate_limited"
    },
    {
      "status": 503,
      "code": "review_rpc"
    },
    {
      "status": 503,
      "code": "review_store"
    }
  ],
  "x-agentpaywire-problem": "HTTP 400, 401, 404, 405, 429, 500, 502, and 503 use application/problem+json (RFC 9457): type, title, status, detail, and the existing error code. 400 responses add invalidParams. 429 responses add Retry-After. type is https://agentpaywire.com/problems.json#<code> with hyphens. openapi and pricing link the API document and the L402 discovery file. HTTP 402 payment challenges stay application/json so the L402 fields, x402 accepts, and the bazaar extension stay valid.",
  "components": {
    "securitySchemes": {
      "L402": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Authorization: L402 <macaroon>:<preimage>"
      },
      "AlertToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Subscription token returned once by POST /v1/alerts. Header X-APW-Alert-Token is also accepted."
      },
      "PrepaidCredits": {
        "type": "http",
        "scheme": "bearer",
        "description": "Prepaid token from POST /v1/credits. Header X-APW-Credits is also accepted. GET /v1/credits/me does not spend a call."
      }
    }
  },
  "paths": {
    "/openapi.json": {
      "get": {
        "operationId": "openapiRoot",
        "summary": "This document. Free. Same body as /v1/openapi.json.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/openapi.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "OpenAPI 3.1.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "openapi": "3.1.0",
                  "info": {
                    "title": "Agent Paywire API",
                    "version": "1.0.0"
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/": {
      "get": {
        "operationId": "describeRoot",
        "summary": "Same JSON document as GET /v1. Free.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/'"
          }
        ],
        "responses": {
          "200": {
            "description": "Service description. Same body as /v1.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "name": "Agent Paywire API",
                  "paid": true,
                  "protocol": "L402"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/robots.txt": {
      "get": {
        "operationId": "robots",
        "summary": "Crawler rules. Free text file. Allows discovery routes and disallows the paid routes.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/robots.txt'"
          }
        ],
        "responses": {
          "200": {
            "description": "text/plain robots.txt.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "User-agent: *\nAllow: /\n"
              }
            }
          }
        },
        "security": []
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "llmsRedirect",
        "summary": "Redirects to the site copy.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/llms.txt'"
          }
        ],
        "responses": {
          "301": {
            "description": "https://agentpaywire.com/llms.txt",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": ""
              }
            }
          }
        },
        "security": []
      }
    },
    "/sitemap.xml": {
      "get": {
        "operationId": "sitemapRedirect",
        "summary": "Redirects to the site copy.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/sitemap.xml'"
          }
        ],
        "responses": {
          "301": {
            "description": "https://agentpaywire.com/sitemap.xml",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": ""
              }
            }
          }
        },
        "security": []
      }
    },
    "/favicon.ico": {
      "get": {
        "operationId": "faviconRedirect",
        "summary": "Redirects to the site copy.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/favicon.ico'"
          }
        ],
        "responses": {
          "301": {
            "description": "https://agentpaywire.com/favicon.ico",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": ""
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/agent-card.json": {
      "get": {
        "operationId": "agentCard",
        "summary": "A2A Agent Card. The url field is the site. There is no A2A task endpoint. Skills are the MCP tools and HTTP routes that exist.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/agent-card.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "Agent card. application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "name": "Agent Paywire",
                  "url": "https://agentpaywire.com/"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/agent.json": {
      "get": {
        "operationId": "agentJsonRedirect",
        "summary": "Redirects to the site agent.json, which redirects to the agent card.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/agent.json'"
          }
        ],
        "responses": {
          "301": {
            "description": "https://agentpaywire.com/.well-known/agent.json",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": ""
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/ai-catalog.json": {
      "get": {
        "operationId": "aiCatalogRedirect",
        "summary": "Redirects to the site AI catalog.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/ai-catalog.json'"
          }
        ],
        "responses": {
          "301": {
            "description": "https://agentpaywire.com/.well-known/ai-catalog.json",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": ""
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1": {
      "get": {
        "operationId": "describe",
        "summary": "Pricing, the L402 flow, and links. Free.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1'"
          }
        ],
        "responses": {
          "200": {
            "description": "Service description.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "name": "Agent Paywire API",
                  "paid": true,
                  "protocol": "L402",
                  "payment": "Lightning",
                  "pricing": {
                    "amount_sats": 100,
                    "credits": 100,
                    "ttl_days": 30,
                    "unit": "One credit is one paid request."
                  },
                  "auth": {
                    "challenge": "HTTP 402 with WWW-Authenticate: L402 macaroon=\"<macaroon>\", invoice=\"<bolt11>\".",
                    "retry": "Authorization: L402 <macaroon>:<preimage>"
                  },
                  "openapi": "https://api.agentpaywire.com/v1/openapi.json",
                  "free_data": "https://agentpaywire.com/api/index.json"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/health": {
      "get": {
        "operationId": "health",
        "summary": "Free health check. payments is configured when the selected wallet parses, and unconfigured otherwise. last_success_at is the cached D1 timestamp of the last wallet call that returned. Shallow health does not call the wallet. ?deep=1 probes it: NWC get_info, or the Lightning address lnurlp document. A rate limit returns 503 with Retry-After.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/health'\ncurl -i 'https://api.agentpaywire.com/v1/health?deep=1'"
          }
        ],
        "parameters": [
          {
            "name": "deep",
            "in": "query",
            "required": false,
            "description": "Set to 1 to probe the wallet. Omit it for a shallow check.",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "example": "1"
          }
        ],
        "responses": {
          "200": {
            "description": "ok true. payments configured or unconfigured. wallet.last_success_at may be null.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "service": "agentpaywire-api",
                  "payments": "configured",
                  "wallet": {
                    "backend": "<wallet backend>",
                    "last_success_at": null
                  }
                }
              }
            }
          },
          "503": {
            "description": "Wallet rate limit during ?deep=1. Retry-After is set. The body is the health document with ok false.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": false,
                  "service": "agentpaywire-api",
                  "payments": "configured",
                  "wallet": {
                    "backend": "<wallet backend>",
                    "error": "rate_limited",
                    "retry_after": 10
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/openapi.json": {
      "get": {
        "operationId": "openapi",
        "summary": "This document. Free. Same body as /openapi.json.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/openapi.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "OpenAPI 3.1.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "openapi": "3.1.0",
                  "info": {
                    "title": "Agent Paywire API",
                    "version": "1.0.0"
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/security.txt": {
      "get": {
        "operationId": "securityTxt",
        "summary": "RFC 9116 security contact. Same body as https://agentpaywire.com/.well-known/security.txt. Free.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/security.txt'"
          }
        ],
        "responses": {
          "200": {
            "description": "text/plain. Contact, Expires, Preferred-Languages, and Canonical.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "Contact: mailto:agentpaywire@gmail.com\nExpires: 2027-10-21T00:00:00Z\nPreferred-Languages: en\nCanonical: https://agentpaywire.com/.well-known/security.txt\n"
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/l402": {
      "get": {
        "operationId": "l402Discovery",
        "summary": "L402 discovery. Free.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/l402'"
          }
        ],
        "responses": {
          "200": {
            "description": "Challenge and retry instructions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "protocol": "L402",
                  "payment": "Lightning",
                  "paid": true,
                  "api": "https://api.agentpaywire.com/v1",
                  "price_sats": 100,
                  "credits": 100,
                  "ttl_days": 30,
                  "unit": "One credit is one paid request.",
                  "authorization": "Authorization: L402 <macaroon>:<preimage>",
                  "openapi": "https://api.agentpaywire.com/v1/openapi.json"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/402index-verify.txt": {
      "get": {
        "operationId": "index402Verify",
        "summary": "402index domain check. Free. The body is the INDEX402_VERIFY_HASH secret when that 64-character hex value is set, and 404 when it is unset. No redirect.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/402index-verify.txt'"
          }
        ],
        "responses": {
          "200": {
            "description": "text/plain. The hash and nothing else.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "<64 hex characters>"
              }
            }
          },
          "404": {
            "description": "not_found. The secret is unset or not 64 hex characters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "not_found"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/satring-verify": {
      "get": {
        "operationId": "satringVerify",
        "summary": "Satring domain check. Free. The body is the SATRING_VERIFY secret when it is set, and 404 when it is unset. No redirect.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/satring-verify'"
          }
        ],
        "responses": {
          "200": {
            "description": "text/plain. The secret and nothing else.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "<satring verify secret>"
              }
            }
          },
          "404": {
            "description": "not_found. The secret is unset.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "not_found"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/l402-services": {
      "get": {
        "operationId": "l402Services",
        "summary": "402index service list. Free. services[].endpoint is the path, method is GET, and request_schema is a flat field map. 100 sats buys a 100-credit token.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/l402-services'"
          }
        ],
        "responses": {
          "200": {
            "description": "search, updates, digest, and changes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "version": "1",
                  "services": [
                    {
                      "endpoint": "/v1/search",
                      "method": "GET",
                      "price_sats": 100,
                      "credits": 100,
                      "ttl_days": 30
                    }
                  ]
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/search": {
      "get": {
        "operationId": "search",
        "summary": "Full-text search over the library and articles. Paid.",
        "security": [
          {
            "L402": []
          }
        ],
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "session",
              "amount": "100",
              "currency": "BTC",
              "description": "amount is 100 satoshis of BTC, not 100 bitcoin. Payment rail: Lightning. intent session means one payment buys the credit bundle. 100 sats buys 100 credits for 30 days. One credit is one paid request."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.01",
              "currency": "USD",
              "description": "amount is 0.01 USDC per call on Base, not satoshis and not a credit bundle. Packs are POST /v1/credits. Payment rail: x402. Network eip155:8453. Atomic amount 10000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 100,
          "credits": 100,
          "ttl_days": 30,
          "unit": "One credit is one paid request."
        },
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "L402 flow",
            "source": "# Placeholders in angle brackets are not real credentials. <macaroon> is the base64 macaroon from the HTTP 402 challenge. <preimage> is the hex payment preimage. <bolt11> is the Lightning invoice in that challenge. The changes sample uses since=2026-10-01, an inclusive verified_at date. One purchase is 100 sats for 100 credits, valid 30 days. One credit is one paid call. The files on https://agentpaywire.com stay free.\n# 1. Request with no Authorization header.\ncurl -i 'https://api.agentpaywire.com/v1/search?q=bitcoin'\n# The 402 WWW-Authenticate header is: L402 macaroon=\"<macaroon>\", invoice=\"<bolt11>\"\n# 2. Pay <bolt11> on Lightning and keep the hex preimage.\n# 3. Retry the same URL.\ncurl -i 'https://api.agentpaywire.com/v1/search?q=bitcoin' \\\n  -H 'Authorization: L402 <macaroon>:<preimage>'\n# The same credential pays for changes. since is inclusive.\ncurl -i 'https://api.agentpaywire.com/v1/changes?since=2026-10-01&format=json' \\\n  -H 'Authorization: L402 <macaroon>:<preimage>'"
          },
          {
            "lang": "python",
            "label": "L402 flow",
            "source": "import urllib.error\nimport urllib.request\n\n# Placeholders in angle brackets are not real credentials. <macaroon> is the base64 macaroon from the HTTP 402 challenge. <preimage> is the hex payment preimage. <bolt11> is the Lightning invoice in that challenge. The changes sample uses since=2026-10-01, an inclusive verified_at date. One purchase is 100 sats for 100 credits, valid 30 days. One credit is one paid call. The files on https://agentpaywire.com stay free.\nsearch = \"https://api.agentpaywire.com/v1/search?q=bitcoin\"\nchanges = \"https://api.agentpaywire.com/v1/changes?since=2026-10-01&format=json\"\n# 1. No Authorization header. HTTP 402 carries WWW-Authenticate.\ntry:\n    urllib.request.urlopen(search)\nexcept urllib.error.HTTPError as error:\n    print(error.status, error.headers.get(\"WWW-Authenticate\"))\n# 2. Pay <bolt11>. Then replace the placeholders and retry.\ncredential = \"L402 <macaroon>:<preimage>\"\npaid = urllib.request.Request(search, headers={\"Authorization\": credential})\nprint(urllib.request.urlopen(paid).read().decode())\ndigest = urllib.request.Request(changes, headers={\"Authorization\": credential})\nprint(urllib.request.urlopen(digest).read().decode())"
          },
          {
            "lang": "javascript",
            "label": "L402 flow",
            "source": "// Placeholders in angle brackets are not real credentials. <macaroon> is the base64 macaroon from the HTTP 402 challenge. <preimage> is the hex payment preimage. <bolt11> is the Lightning invoice in that challenge. The changes sample uses since=2026-10-01, an inclusive verified_at date. One purchase is 100 sats for 100 credits, valid 30 days. One credit is one paid call. The files on https://agentpaywire.com stay free.\nconst search = \"https://api.agentpaywire.com/v1/search?q=bitcoin\";\nconst changes = \"https://api.agentpaywire.com/v1/changes?since=2026-10-01&format=json\";\n// 1. No Authorization header.\nconst challenge = await fetch(search);\n// challenge.status is 402. Read the WWW-Authenticate header, then pay <bolt11>.\nconst credential = \"L402 <macaroon>:<preimage>\";\nconst paid = await fetch(search, { headers: { Authorization: credential } });\nconst digest = await fetch(changes, { headers: { Authorization: credential } });\nconsole.log(paid.status, await paid.text());\nconsole.log(digest.status, await digest.text());"
          },
          {
            "lang": "curl",
            "label": "x402 402",
            "source": "# x402 is the second rail. One payment is 0.01 USDC per call on Base. Packs are POST /v1/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>'"
          },
          {
            "lang": "javascript",
            "label": "x402",
            "source": "// 0.01 USDC per call on Base. Packs are POST /v1/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());"
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Space-separated words. Every word must match.",
            "schema": {
              "type": "string"
            },
            "example": "bitcoin"
          },
          {
            "name": "category",
            "in": "query",
            "description": "Category id, for example bitcoin-lightning.",
            "schema": {
              "type": "string"
            },
            "example": "bitcoin-lightning"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Exact library status: proposal, individual_draft, working_group_draft, standard, spec_released, product_docs, news, research, or unknown. When set, article hits are left out. Any other value is status_invalid and spends no credit.",
            "schema": {
              "type": "string",
              "enum": [
                "proposal",
                "individual_draft",
                "working_group_draft",
                "standard",
                "spec_released",
                "product_docs",
                "news",
                "research",
                "unknown"
              ]
            },
            "example": "spec_released"
          },
          {
            "name": "since",
            "in": "query",
            "description": "Keep hits whose date is on or after this value.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "<YYYY-MM-DD>"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum hits. Default 50. Values above 100 are clamped.",
            "schema": {
              "type": "integer",
              "default": 50,
              "maximum": 100
            },
            "example": 50
          }
        ],
        "responses": {
          "200": {
            "description": "Search hits.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "q": "bitcoin",
                  "category": null,
                  "status": null,
                  "since": null,
                  "count": 0,
                  "credits_remaining": "<credits remaining after this call>",
                  "review_url": "https://api.agentpaywire.com/v1/reviews",
                  "results": []
                }
              }
            }
          },
          "402": {
            "description": "L402 challenge, unsettled invoice, or a spent bundle. No new credit is spent on a repeat challenge for an unpaid invoice.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "protocol": "L402",
                  "payment": "Lightning",
                  "price": {
                    "amount_sats": 100,
                    "credits": 100,
                    "ttl_days": 30,
                    "unit": "One credit is one paid request."
                  },
                  "invoice": "<bolt11>",
                  "macaroon": "<macaroon>",
                  "how_to_pay": "Pay the BOLT11 invoice, then retry with Authorization: L402 <macaroon>:<preimage>. One purchase grants the listed credits for the listed number of days. The files on https://agentpaywire.com stay free.",
                  "free_data": "https://agentpaywire.com/api/index.json"
                }
              }
            }
          }
        }
      }
    },
    "/v1/updates": {
      "get": {
        "operationId": "updates",
        "summary": "Records with verified_at on or after since. Paid.",
        "security": [
          {
            "L402": []
          }
        ],
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "session",
              "amount": "100",
              "currency": "BTC",
              "description": "amount is 100 satoshis of BTC, not 100 bitcoin. Payment rail: Lightning. intent session means one payment buys the credit bundle. 100 sats buys 100 credits for 30 days. One credit is one paid request."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.01",
              "currency": "USD",
              "description": "amount is 0.01 USDC per call on Base, not satoshis and not a credit bundle. Packs are POST /v1/credits. Payment rail: x402. Network eip155:8453. Atomic amount 10000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 100,
          "credits": 100,
          "ttl_days": 30,
          "unit": "One credit is one paid request."
        },
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/updates?since=<YYYY-MM-DD>' \\\n  -H 'Authorization: L402 <macaroon>:<preimage>'"
          }
        ],
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": true,
            "description": "Inclusive lower bound. Date.parse must accept it. Example placeholder: <YYYY-MM-DD>.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "<YYYY-MM-DD>"
          }
        ],
        "responses": {
          "200": {
            "description": "Changed records.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "since": "<YYYY-MM-DD>",
                  "comparison": "verified_at >= since",
                  "count": 0,
                  "credits_remaining": "<credits remaining after this call>",
                  "review_url": "https://api.agentpaywire.com/v1/reviews",
                  "entries": []
                }
              }
            }
          },
          "400": {
            "description": "since_required. No credit is spent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "since_required"
                }
              }
            }
          },
          "402": {
            "description": "L402 challenge, unsettled invoice, or a spent bundle. No new credit is spent on a repeat challenge for an unpaid invoice.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "protocol": "L402",
                  "payment": "Lightning",
                  "price": {
                    "amount_sats": 100,
                    "credits": 100,
                    "ttl_days": 30,
                    "unit": "One credit is one paid request."
                  },
                  "invoice": "<bolt11>",
                  "macaroon": "<macaroon>",
                  "how_to_pay": "Pay the BOLT11 invoice, then retry with Authorization: L402 <macaroon>:<preimage>. One purchase grants the listed credits for the listed number of days. The files on https://agentpaywire.com stay free.",
                  "free_data": "https://agentpaywire.com/api/index.json"
                }
              }
            }
          }
        }
      }
    },
    "/v1/digest": {
      "get": {
        "operationId": "digest",
        "summary": "Structured digest of entries in the last N days. Paid.",
        "security": [
          {
            "L402": []
          }
        ],
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "session",
              "amount": "100",
              "currency": "BTC",
              "description": "amount is 100 satoshis of BTC, not 100 bitcoin. Payment rail: Lightning. intent session means one payment buys the credit bundle. 100 sats buys 100 credits for 30 days. One credit is one paid request."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.01",
              "currency": "USD",
              "description": "amount is 0.01 USDC per call on Base, not satoshis and not a credit bundle. Packs are POST /v1/credits. Payment rail: x402. Network eip155:8453. Atomic amount 10000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 100,
          "credits": 100,
          "ttl_days": 30,
          "unit": "One credit is one paid request."
        },
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/digest?days=7' \\\n  -H 'Authorization: L402 <macaroon>:<preimage>'"
          }
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "description": "Window length. Default 7. Clamped to 1 through 90.",
            "schema": {
              "type": "integer",
              "default": 7
            },
            "example": 7
          }
        ],
        "responses": {
          "200": {
            "description": "Digest.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "days": 7,
                  "from": "<YYYY-MM-DD>",
                  "to": "<YYYY-MM-DD>",
                  "generated_at": "<ISO-8601 timestamp>",
                  "library": {
                    "count": 0,
                    "entries": []
                  },
                  "articles": {
                    "count": 0,
                    "entries": []
                  },
                  "credits_remaining": "<credits remaining after this call>",
                  "review_url": "https://api.agentpaywire.com/v1/reviews"
                }
              }
            }
          },
          "402": {
            "description": "L402 challenge, unsettled invoice, or a spent bundle. No new credit is spent on a repeat challenge for an unpaid invoice.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "protocol": "L402",
                  "payment": "Lightning",
                  "price": {
                    "amount_sats": 100,
                    "credits": 100,
                    "ttl_days": 30,
                    "unit": "One credit is one paid request."
                  },
                  "invoice": "<bolt11>",
                  "macaroon": "<macaroon>",
                  "how_to_pay": "Pay the BOLT11 invoice, then retry with Authorization: L402 <macaroon>:<preimage>. One purchase grants the listed credits for the listed number of days. The files on https://agentpaywire.com stay free.",
                  "free_data": "https://agentpaywire.com/api/index.json"
                }
              }
            }
          }
        }
      }
    },
    "/v1/changes": {
      "get": {
        "operationId": "changes",
        "summary": "Library sources whose verified_at is inside an inclusive since/until window, grouped by tag. JSON or Markdown. Omit since for the last 7 UTC days through today. A probe is HTTP 402. Opt in with X-APW-Trial: 1 or trial=1 for five unpaid calls per client per rolling 24 hours, then one credit at the same price as search.",
        "description": "Omit since and the window is the last 7 UTC days through today, the same inclusive span as GET /v1/digest with days 7. A since or until value that is present and not YYYY-MM-DD, an ISO 8601 datetime with Z or an offset, or a unix timestamp in seconds or milliseconds is HTTP 400 and does not spend a credit or a trial call. A valid value is normalised to the inclusive UTC verified_at date. Each client is the salted hash already used for L402 challenge reuse: the network prefix and the full User-Agent. The raw IP is not stored. The trial is opt-in so a standard x402 or L402 probe sees HTTP 402 first. Send header X-APW-Trial: 1 or query trial=1 on GET. That client may then receive 5 HTTP 200 responses from this route per rolling 24 hours without paying. A request with no opt-in is the usual HTTP 402 and does not use a trial call. HEAD is always that 402, even with the opt-in, and does not use a trial call. A User-Agent containing 402index, 402-index, 402explorer, 402registry, x402scan, x402-list, x402-observer, x402lint, x402-opportunity, l402directory, l402-directory, l402apps, satring, toll402, agentindexbot, or agentalmanac is always that 402, even with the opt-in. A trial response adds Cache-Control: no-store, the header X-Trial-Remaining (calls left after this response), and trial {remaining, limit: 5, window_s: 86400, then: \"HTTP 402 via x402 or L402\"}. A 400 or 502 does not use a trial call. A request that presents Authorization, PAYMENT-SIGNATURE, or X-PAYMENT skips the trial and does not use a call, including when that payment is rejected. After the allowance, the response is the usual HTTP 402, plus X-Trial-Remaining: 0, hint, and trial.remaining 0. A paid call spends one credit and omits trial.",
        "security": [
          {
            "L402": []
          }
        ],
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "session",
              "amount": "100",
              "currency": "BTC",
              "description": "amount is 100 satoshis of BTC, not 100 bitcoin. Payment rail: Lightning. intent session means one payment buys the credit bundle. 100 sats buys 100 credits for 30 days. One credit is one paid request."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.01",
              "currency": "USD",
              "description": "amount is 0.01 USDC per call on Base, not satoshis and not a credit bundle. Packs are POST /v1/credits. Payment rail: x402. Network eip155:8453. Atomic amount 10000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 100,
          "credits": 100,
          "ttl_days": 30,
          "unit": "One credit is one paid request."
        },
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "L402 flow",
            "source": "# Placeholders in angle brackets are not real credentials. <macaroon> is the base64 macaroon from the HTTP 402 challenge. <preimage> is the hex payment preimage. <bolt11> is the Lightning invoice in that challenge. The changes sample uses since=2026-10-01, an inclusive verified_at date. One purchase is 100 sats for 100 credits, valid 30 days. One credit is one paid call. The files on https://agentpaywire.com stay free.\n# 1. Request with no Authorization header.\ncurl -i 'https://api.agentpaywire.com/v1/search?q=bitcoin'\n# The 402 WWW-Authenticate header is: L402 macaroon=\"<macaroon>\", invoice=\"<bolt11>\"\n# 2. Pay <bolt11> on Lightning and keep the hex preimage.\n# 3. Retry the same URL.\ncurl -i 'https://api.agentpaywire.com/v1/search?q=bitcoin' \\\n  -H 'Authorization: L402 <macaroon>:<preimage>'\n# The same credential pays for changes. since is inclusive.\ncurl -i 'https://api.agentpaywire.com/v1/changes?since=2026-10-01&format=json' \\\n  -H 'Authorization: L402 <macaroon>:<preimage>'"
          },
          {
            "lang": "python",
            "label": "L402 flow",
            "source": "import urllib.error\nimport urllib.request\n\n# Placeholders in angle brackets are not real credentials. <macaroon> is the base64 macaroon from the HTTP 402 challenge. <preimage> is the hex payment preimage. <bolt11> is the Lightning invoice in that challenge. The changes sample uses since=2026-10-01, an inclusive verified_at date. One purchase is 100 sats for 100 credits, valid 30 days. One credit is one paid call. The files on https://agentpaywire.com stay free.\nsearch = \"https://api.agentpaywire.com/v1/search?q=bitcoin\"\nchanges = \"https://api.agentpaywire.com/v1/changes?since=2026-10-01&format=json\"\n# 1. No Authorization header. HTTP 402 carries WWW-Authenticate.\ntry:\n    urllib.request.urlopen(search)\nexcept urllib.error.HTTPError as error:\n    print(error.status, error.headers.get(\"WWW-Authenticate\"))\n# 2. Pay <bolt11>. Then replace the placeholders and retry.\ncredential = \"L402 <macaroon>:<preimage>\"\npaid = urllib.request.Request(search, headers={\"Authorization\": credential})\nprint(urllib.request.urlopen(paid).read().decode())\ndigest = urllib.request.Request(changes, headers={\"Authorization\": credential})\nprint(urllib.request.urlopen(digest).read().decode())"
          },
          {
            "lang": "javascript",
            "label": "L402 flow",
            "source": "// Placeholders in angle brackets are not real credentials. <macaroon> is the base64 macaroon from the HTTP 402 challenge. <preimage> is the hex payment preimage. <bolt11> is the Lightning invoice in that challenge. The changes sample uses since=2026-10-01, an inclusive verified_at date. One purchase is 100 sats for 100 credits, valid 30 days. One credit is one paid call. The files on https://agentpaywire.com stay free.\nconst search = \"https://api.agentpaywire.com/v1/search?q=bitcoin\";\nconst changes = \"https://api.agentpaywire.com/v1/changes?since=2026-10-01&format=json\";\n// 1. No Authorization header.\nconst challenge = await fetch(search);\n// challenge.status is 402. Read the WWW-Authenticate header, then pay <bolt11>.\nconst credential = \"L402 <macaroon>:<preimage>\";\nconst paid = await fetch(search, { headers: { Authorization: credential } });\nconst digest = await fetch(changes, { headers: { Authorization: credential } });\nconsole.log(paid.status, await paid.text());\nconsole.log(digest.status, await digest.text());"
          },
          {
            "lang": "curl",
            "label": "x402 402",
            "source": "# x402 is the second rail. One payment is 0.01 USDC per call on Base. Packs are POST /v1/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>'"
          },
          {
            "lang": "javascript",
            "label": "x402",
            "source": "// 0.01 USDC per call on Base. Packs are POST /v1/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());"
          }
        ],
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Inclusive lower bound on verified_at, normalised to a UTC date. YYYY-MM-DD, an ISO 8601 datetime with Z or a numeric offset, or a unix timestamp in seconds or milliseconds. Omit it and the window starts 7 UTC days ago, through today. A present value that is none of those forms is HTTP 400 since_required and does not spend a credit.",
            "example": "2026-10-01"
          },
          {
            "name": "until",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Inclusive upper bound on verified_at, normalised to a UTC date. YYYY-MM-DD, an ISO 8601 datetime with Z or a numeric offset, or a unix timestamp in seconds or milliseconds. Optional.",
            "example": "2026-10-20"
          },
          {
            "name": "protocols",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated library tags.",
            "example": "l402"
          },
          {
            "name": "categories",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated category ids.",
            "example": "bitcoin-lightning"
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "new",
                "updated"
              ]
            },
            "description": "new or updated.",
            "example": "new"
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "markdown"
              ],
              "default": "json"
            },
            "description": "json or markdown.",
            "example": "json"
          },
          {
            "name": "trial",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "const": "1"
            },
            "description": "Opt in to the 5-call trial. Send 1, or header X-APW-Trial: 1. Omit both on a probe. HEAD and a directory-probe User-Agent ignore this and stay on HTTP 402."
          }
        ],
        "responses": {
          "200": {
            "description": "Grouped library digest. format=markdown is text/markdown. A trial response adds trial and X-Trial-Remaining and omits credits_remaining. A paid response has credits_remaining and omits trial. Cache-Control is no-store on a trial response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "since": "2026-10-01",
                  "until": null,
                  "protocols": null,
                  "categories": null,
                  "type": null,
                  "scope": "library",
                  "generated_at": "<ISO-8601 timestamp>",
                  "count": 0,
                  "groups": [],
                  "credits_remaining": "<credits remaining after this call, paid only>",
                  "trial": {
                    "remaining": 4,
                    "limit": 5,
                    "window_s": 86400,
                    "then": "HTTP 402 via x402 or L402"
                  },
                  "review_url": "https://api.agentpaywire.com/v1/reviews"
                }
              }
            },
            "headers": {
              "X-Trial-Remaining": {
                "description": "Calls left after this trial response. Absent when the call was paid.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "400": {
            "description": "since_required when since is present and not an accepted date form, until_invalid, type_invalid, or format_invalid. Accepted forms are YYYY-MM-DD, an ISO 8601 datetime with Z or an offset, and a unix timestamp in seconds or milliseconds. The body lists them in accepted. Omitted since is the last 7 UTC days. application/problem+json. No credit is spent. /v1/search uses status_invalid for an unknown status.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "type": "https://agentpaywire.com/problems.json#since-required",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "Query parameter since must be YYYY-MM-DD, an ISO 8601 datetime with Z or an offset, or a unix timestamp in seconds or milliseconds. Omit it for the last 7 UTC days.",
                  "error": "since_required",
                  "openapi": "https://api.agentpaywire.com/openapi.json",
                  "pricing": "https://api.agentpaywire.com/.well-known/l402",
                  "invalidParams": [
                    {
                      "name": "since",
                      "reason": "Use YYYY-MM-DD, an ISO 8601 datetime with Z or an offset, or a unix timestamp in seconds or milliseconds."
                    }
                  ],
                  "accepted": [
                    "YYYY-MM-DD",
                    "YYYY-MM-DDTHH:MM:SSZ",
                    "YYYY-MM-DDTHH:MM:SS+HH:MM",
                    "YYYY-MM-DDTHH:MM:SS-HH:MM",
                    "unix seconds",
                    "unix milliseconds"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "L402 challenge, unsettled invoice, or a spent bundle. When the GET /v1/changes trial is used up, the body also has hint and trial.remaining 0, and X-Trial-Remaining is 0. A presented payment that fails does not add that hint and does not use a trial call. dependency_sample.url is the free 3-card sample.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "protocol": "L402",
                  "payment": "Lightning",
                  "price": {
                    "amount_sats": 100,
                    "credits": 100,
                    "ttl_days": 30,
                    "unit": "One credit is one paid request."
                  },
                  "invoice": "<bolt11>",
                  "macaroon": "<macaroon>",
                  "how_to_pay": "Pay the BOLT11 invoice, then retry with Authorization: L402 <macaroon>:<preimage>. One purchase grants the listed credits for the listed number of days. The files on https://agentpaywire.com stay free.",
                  "free_data": "https://agentpaywire.com/api/index.json"
                }
              }
            }
          },
          "405": {
            "description": "method_not_allowed. Allow: GET, HEAD, OPTIONS. Use GET with query parameters. POST is not supported.",
            "headers": {
              "Allow": {
                "schema": {
                  "const": "GET, HEAD, OPTIONS"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "type": "https://agentpaywire.com/problems.json#method-not-allowed",
                  "title": "Method Not Allowed",
                  "status": 405,
                  "detail": "Use GET with query parameters. POST is not supported. See the OpenAPI document for the parameters.",
                  "error": "method_not_allowed",
                  "openapi": "https://api.agentpaywire.com/openapi.json",
                  "pricing": "https://api.agentpaywire.com/.well-known/l402",
                  "hint": "Use GET. since and until accept YYYY-MM-DD, YYYY-MM-DDTHH:MM:SSZ, YYYY-MM-DDTHH:MM:SS+HH:MM, YYYY-MM-DDTHH:MM:SS-HH:MM, unix seconds, unix milliseconds.",
                  "feedback": "https://api.agentpaywire.com/v1/feedback"
                }
              }
            }
          }
        }
      }
    },
    "/v1/changes/sample": {
      "get": {
        "operationId": "changesSample",
        "summary": "Free sample of curated library cards for payment dependencies in the default 7-day window. At most 3 cards. No query parameters. Does not spend a credit or a trial call.",
        "description": "Use this before GET /v1/changes. The cards are the same fields as a paid change item: id, title, url, publisher, date_published, verified_at, change_type, summary, category, and tags. scope is library. change_type is not a breaking-change verdict. A version is only whatever the card title or summary already says. protocols is the fixed set bolt12, l402, lightning, nwc, wallet, and x402. Any query parameter is HTTP 400. The response is cacheable. Authorization and a prepaid token are ignored and are not spent.",
        "security": [],
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/changes/sample'"
          }
        ],
        "responses": {
          "200": {
            "description": "At most 3 cited library cards. sample is true and paid is false.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "use": "payment-dependencies",
                  "sample": true,
                  "paid": false,
                  "scope": "library",
                  "since": "<YYYY-MM-DD>",
                  "returned": 0,
                  "limit": 3,
                  "changes": []
                }
              }
            }
          },
          "400": {
            "description": "sample_fixed. A query parameter was present.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "sample_fixed"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/x402.json": {
      "get": {
        "operationId": "x402Json",
        "summary": "Same document as /.well-known/x402. Free.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/x402.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "Payment requirements for one USDC call. Packs are POST /v1/credits.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "x402Version": 2,
                  "protocol": "x402",
                  "default_rail": "L402",
                  "credits": null
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/x402.json": {
      "get": {
        "operationId": "x402JsonRoot",
        "summary": "Same document as /.well-known/x402. Free.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/x402.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "Payment requirements for one USDC call. Packs are POST /v1/credits.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "x402Version": 2,
                  "protocol": "x402",
                  "default_rail": "L402",
                  "credits": null
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/x402": {
      "get": {
        "operationId": "x402Discovery",
        "summary": "x402 discovery. Free. Present only while that rail is configured. L402 stays the default.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/x402'"
          }
        ],
        "responses": {
          "200": {
            "description": "Payment requirements for one USDC call. Packs are POST /v1/credits.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "x402Version": 2,
                  "protocol": "x402",
                  "default_rail": "L402",
                  "price_usd": "0.01",
                  "network": "eip155:8453",
                  "amount": "10000",
                  "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                  "pay_to": "0x7BB50FB9141A619961f1c29C4e0b539d60f29D20",
                  "credits": null
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/mcp": {
      "get": {
        "operationId": "mcpPointer",
        "summary": "JSON pointer to the MCP server. Not an MCP session. POST returns the same JSON. Do not follow a redirect for POST.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/mcp'"
          }
        ],
        "responses": {
          "200": {
            "description": "MCP URL on the other host.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "mcp": "https://mcp.agentpaywire.com/mcp",
                  "transport": "streamable-http"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/mcp/v1": {
      "get": {
        "operationId": "mcpPointerV1",
        "summary": "JSON pointer to the MCP server. Not an MCP session. POST returns the same JSON. Do not follow a redirect for POST.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/mcp/v1'"
          }
        ],
        "responses": {
          "200": {
            "description": "MCP URL on the other host.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "mcp": "https://mcp.agentpaywire.com/mcp",
                  "transport": "streamable-http"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/sse": {
      "get": {
        "operationId": "mcpPointerSse",
        "summary": "JSON pointer to the MCP server. Not an MCP session. POST returns the same JSON. Do not follow a redirect for POST.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/sse'"
          }
        ],
        "responses": {
          "200": {
            "description": "MCP URL on the other host.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "mcp": "https://mcp.agentpaywire.com/mcp",
                  "transport": "streamable-http"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/mcp": {
      "get": {
        "operationId": "mcpPointerApi",
        "summary": "JSON pointer to the MCP server. Not an MCP session. POST returns the same JSON. Do not follow a redirect for POST.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/api/mcp'"
          }
        ],
        "responses": {
          "200": {
            "description": "MCP URL on the other host.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "mcp": "https://mcp.agentpaywire.com/mcp",
                  "transport": "streamable-http"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/feedback": {
      "get": {
        "operationId": "feedbackGet",
        "summary": "Not a listing. GET returns 405. POST a JSON report instead. Free. No payment.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/feedback'"
          }
        ],
        "responses": {
          "405": {
            "description": "method_not_allowed. Allow: POST, OPTIONS. This path does not list submissions.",
            "headers": {
              "Allow": {
                "schema": {
                  "const": "POST, OPTIONS"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "type": "https://agentpaywire.com/problems.json#method-not-allowed",
                  "title": "Method Not Allowed",
                  "status": 405,
                  "detail": "Use POST with a JSON body and the fields in the OpenAPI document. This path does not list submissions.",
                  "error": "method_not_allowed",
                  "openapi": "https://api.agentpaywire.com/openapi.json",
                  "pricing": "https://api.agentpaywire.com/.well-known/l402",
                  "feedback": "https://api.agentpaywire.com/v1/feedback",
                  "hint": "To report a missing route, POST looking_for as JSON to the feedback URL. No payment."
                }
              }
            }
          }
        },
        "security": []
      },
      "post": {
        "operationId": "feedbackPost",
        "summary": "Report data you expected and did not find. Free. No payment. Unknown fields are rejected. The body is at most 2048 bytes. The text is stored for the operator and is not executed.",
        "security": [],
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i -X POST 'https://api.agentpaywire.com/v1/feedback' -H 'content-type: application/json' -d '{\"looking_for\":\"A machine-readable list of facilitator fees.\"}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "looking_for"
                ],
                "additionalProperties": false,
                "properties": {
                  "looking_for": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "use_case": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "preferred_format": {
                    "type": "string",
                    "enum": [
                      "json",
                      "csv",
                      "md",
                      "mcp_tool",
                      "endpoint",
                      "other"
                    ]
                  },
                  "path_tried": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "protocol": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "agent": {
                    "type": "string",
                    "maxLength": 100
                  }
                }
              },
              "example": {
                "looking_for": "A machine-readable list of facilitator fees.",
                "preferred_format": "json",
                "protocol": "x402"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted. The id is server-generated. The report text is not echoed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "disclaimer": {
                    "text": "Not investment advice.",
                    "url": "https://agentpaywire.com/disclaimer.json"
                  },
                  "id": "fb_0123456789abcdef01234567",
                  "status": "accepted"
                }
              }
            }
          },
          "400": {
            "description": "feedback_invalid, feedback_too_large, feedback_urls_only, or feedback_duplicate. application/problem+json.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "type": "https://agentpaywire.com/problems.json#feedback-invalid",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "The feedback body is not valid.",
                  "error": "feedback_invalid",
                  "openapi": "https://api.agentpaywire.com/openapi.json",
                  "pricing": "https://api.agentpaywire.com/.well-known/l402",
                  "invalidParams": [
                    {
                      "name": "looking_for",
                      "reason": "Required string, 1 to 500 characters."
                    }
                  ],
                  "hint": "POST application/json. Required field looking_for is a string of 1 to 500 characters. Optional fields: use_case, preferred_format (json, csv, md, mcp_tool, endpoint, or other), path_tried, protocol, and agent.",
                  "example": {
                    "looking_for": "A machine-readable list of facilitator fees."
                  }
                }
              }
            }
          },
          "429": {
            "description": "feedback_rate_limited. Retry-After is set. The cap is 10 reports per client per hour and 500 per UTC day.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "type": "https://agentpaywire.com/problems.json#feedback-rate-limited",
                  "title": "Too Many Requests",
                  "status": 429,
                  "detail": "This client sent too many feedback reports this hour.",
                  "error": "feedback_rate_limited",
                  "openapi": "https://api.agentpaywire.com/openapi.json",
                  "pricing": "https://api.agentpaywire.com/.well-known/l402"
                }
              }
            }
          },
          "503": {
            "description": "feedback_store. The table could not be written.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "type": "https://agentpaywire.com/problems.json#feedback-store",
                  "title": "Service Unavailable",
                  "status": 503,
                  "detail": "The feedback row could not be written.",
                  "error": "feedback_store",
                  "openapi": "https://api.agentpaywire.com/openapi.json",
                  "pricing": "https://api.agentpaywire.com/.well-known/l402"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reviews": {
      "get": {
        "operationId": "reviewsGet",
        "summary": "Public review feed. Same JSON as GET /reviews.json. Free. No payment.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/reviews'"
          }
        ],
        "responses": {
          "200": {
            "description": "Every current review, the raw proof, and how to verify it.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "aggregate": {
                    "count": 0,
                    "mean": null,
                    "weighted_mean": null,
                    "unique_payers": 0,
                    "self_test_count": 0
                  },
                  "how_to_verify": {
                    "statement": "Check every review from the raw proof and signature."
                  },
                  "reviews": []
                }
              }
            }
          },
          "503": {
            "description": "review_store. application/problem+json.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "type": "https://agentpaywire.com/problems.json#review-store",
                  "title": "Service Unavailable",
                  "status": 503,
                  "detail": "The review row could not be written.",
                  "error": "review_store",
                  "openapi": "https://api.agentpaywire.com/openapi.json",
                  "pricing": "https://api.agentpaywire.com/.well-known/l402"
                }
              }
            }
          }
        },
        "security": []
      },
      "post": {
        "operationId": "reviewsPost",
        "summary": "Publish a review of a paid route. Free. No payment. x402 requires an EIP-712 signature and a Base USDC transfer of at least 0.01 to the payee. L402 requires the preimage of a settled payment hash this API issued. One review per payment proof. The same payer replaces their earlier review. The comment is untrusted text.",
        "security": [],
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i -X POST 'https://api.agentpaywire.com/v1/reviews' -H 'content-type: application/json' -d '{\"rating\":5,\"route\":\"/v1/search\",\"proof\":{\"rail\":\"l402\",\"payment_hash\":\"<64 hex>\",\"preimage\":\"<64 hex>\"}}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "rating",
                  "route",
                  "proof"
                ],
                "additionalProperties": false,
                "properties": {
                  "rating": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "route": {
                    "type": "string"
                  },
                  "proof": {
                    "type": "object"
                  },
                  "signature": {
                    "type": "string"
                  },
                  "timestamp": {
                    "type": "integer"
                  }
                }
              },
              "example": {
                "rating": 5,
                "comment": "The search route returned the source I paid for.",
                "route": "/v1/search",
                "proof": {
                  "rail": "x402",
                  "network": "eip155:8453",
                  "tx_hash": "0xabababababababababababababababababababababababababababababababab"
                },
                "signature": "0xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
                "timestamp": 1761091200
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The same payer replaced their earlier review.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "disclaimer": {
                    "text": "Not investment advice.",
                    "url": "https://agentpaywire.com/disclaimer.json"
                  },
                  "id": "rv_0123456789abcdef01234567",
                  "created_at": "2026-10-22T00:00:00.000Z",
                  "updated_at": "2026-10-22T00:00:00.000Z",
                  "rating": 5,
                  "comment": "The search route returned the source I paid for.",
                  "route": "/v1/search",
                  "payer": "0x0000000000000000000000000000000000000001",
                  "self_test": false,
                  "proof": {
                    "rail": "x402",
                    "network": "eip155:8453",
                    "tx_hash": "0xabababababababababababababababababababababababababababababababab"
                  },
                  "signature": "0xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
                  "verification": {
                    "ok": true,
                    "rail": "x402",
                    "payer": "0x0000000000000000000000000000000000000001"
                  },
                  "replaced": true
                }
              }
            }
          },
          "201": {
            "description": "First review for this payer. The stored record includes the raw proof.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "disclaimer": {
                    "text": "Not investment advice.",
                    "url": "https://agentpaywire.com/disclaimer.json"
                  },
                  "id": "rv_0123456789abcdef01234567",
                  "created_at": "2026-10-22T00:00:00.000Z",
                  "updated_at": "2026-10-22T00:00:00.000Z",
                  "rating": 5,
                  "comment": "The search route returned the source I paid for.",
                  "route": "/v1/search",
                  "payer": "0x0000000000000000000000000000000000000001",
                  "self_test": false,
                  "proof": {
                    "rail": "x402",
                    "network": "eip155:8453",
                    "tx_hash": "0xabababababababababababababababababababababababababababababababab"
                  },
                  "signature": "0xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
                  "verification": {
                    "ok": true,
                    "rail": "x402",
                    "payer": "0x0000000000000000000000000000000000000001"
                  },
                  "replaced": false
                }
              }
            }
          },
          "400": {
            "description": "review_invalid, review_too_large, review_signature, review_proof, review_unsettled, review_route, or review_proof_used.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "type": "https://agentpaywire.com/problems.json#review-invalid",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "The review body is not valid.",
                  "error": "review_invalid",
                  "openapi": "https://api.agentpaywire.com/openapi.json",
                  "pricing": "https://api.agentpaywire.com/.well-known/l402",
                  "invalidParams": [
                    {
                      "name": "rating",
                      "reason": "Integer from 1 to 5."
                    }
                  ]
                }
              }
            }
          },
          "429": {
            "description": "review_rate_limited. Retry-After is set. The cap is 10 reviews per payer per hour and 500 per UTC day.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "type": "https://agentpaywire.com/problems.json#review-rate-limited",
                  "title": "Too Many Requests",
                  "status": 429,
                  "detail": "This payer sent too many reviews this hour.",
                  "error": "review_rate_limited",
                  "openapi": "https://api.agentpaywire.com/openapi.json",
                  "pricing": "https://api.agentpaywire.com/.well-known/l402"
                }
              }
            }
          },
          "503": {
            "description": "review_rpc or review_store. The receipt could not be read, or the row could not be written.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "type": "https://agentpaywire.com/problems.json#review-store",
                  "title": "Service Unavailable",
                  "status": 503,
                  "detail": "The review row could not be written.",
                  "error": "review_store",
                  "openapi": "https://api.agentpaywire.com/openapi.json",
                  "pricing": "https://api.agentpaywire.com/.well-known/l402"
                }
              }
            }
          }
        }
      }
    },
    "/reviews.json": {
      "get": {
        "operationId": "reviewsJson",
        "summary": "Public review feed with every review, the raw proof, the signature, the verification result, and how_to_verify. Free.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/reviews.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "Aggregate and reviews. Self-test rows stay in the list and are left out of the mean.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "aggregate": {
                    "count": 1,
                    "mean": 5,
                    "weighted_mean": 5,
                    "unique_payers": 1,
                    "self_test_count": 0
                  },
                  "how_to_verify": {
                    "x402": {
                      "type_string": "Review(uint8 rating,string route,bytes32 txHash,bytes32 commentHash,uint256 timestamp)"
                    }
                  },
                  "reviews": [
                    {
                      "disclaimer": {
                        "text": "Not investment advice.",
                        "url": "https://agentpaywire.com/disclaimer.json"
                      },
                      "id": "rv_0123456789abcdef01234567",
                      "created_at": "2026-10-22T00:00:00.000Z",
                      "updated_at": "2026-10-22T00:00:00.000Z",
                      "rating": 5,
                      "comment": "The search route returned the source I paid for.",
                      "route": "/v1/search",
                      "payer": "0x0000000000000000000000000000000000000001",
                      "self_test": false,
                      "proof": {
                        "rail": "x402",
                        "network": "eip155:8453",
                        "tx_hash": "0xabababababababababababababababababababababababababababababababab"
                      },
                      "signature": "0xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
                      "verification": {
                        "ok": true,
                        "rail": "x402",
                        "payer": "0x0000000000000000000000000000000000000001"
                      },
                      "replaced": false
                    }
                  ]
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/agent-card.json": {
      "get": {
        "operationId": "agentCardRoot",
        "summary": "Same agent card as /.well-known/agent-card.json.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/agent-card.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "Same agent card as /.well-known/agent-card.json.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "name": "Agent Paywire"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/ai-plugin.json": {
      "get": {
        "operationId": "aiPlugin",
        "summary": "OpenAI plugin manifest v1. auth.type none. Paid routes return HTTP 402.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/ai-plugin.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "OpenAI plugin manifest v1. auth.type none. Paid routes return HTTP 402.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "name": "Agent Paywire"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/ai-plugin.json": {
      "get": {
        "operationId": "aiPluginRoot",
        "summary": "Same plugin manifest as /.well-known/ai-plugin.json.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/ai-plugin.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "Same plugin manifest as /.well-known/ai-plugin.json.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "name": "Agent Paywire"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/agents.json": {
      "get": {
        "operationId": "agentsJson",
        "summary": "Wildcard agents.json 0.1.0. Flows use operationIds from this OpenAPI document.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/agents.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "Wildcard agents.json 0.1.0. Flows use operationIds from this OpenAPI document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "name": "Agent Paywire"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/agents.json": {
      "get": {
        "operationId": "agentsJsonRoot",
        "summary": "Same agents.json as /.well-known/agents.json.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/agents.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "Same agents.json as /.well-known/agents.json.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "name": "Agent Paywire"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/mcp.json": {
      "get": {
        "operationId": "mcpDiscovery",
        "summary": "MCP server document. Transport streamable-http. Auth none.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/mcp.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "MCP server document. Transport streamable-http. Auth none.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "name": "Agent Paywire"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/ard.json": {
      "get": {
        "operationId": "ardDiscovery",
        "summary": "Agentic Resource Discovery manifest for the MCP server card, L402 prices, and this OpenAPI document.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/.well-known/ard.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "Agentic Resource Discovery manifest for the MCP server card, L402 prices, and this OpenAPI document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "name": "Agent Paywire"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/mcp.json": {
      "get": {
        "operationId": "mcpDiscoveryRoot",
        "summary": "Same MCP document as /.well-known/mcp.json.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/mcp.json'"
          }
        ],
        "responses": {
          "200": {
            "description": "Same MCP document as /.well-known/mcp.json.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "name": "Agent Paywire"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/reviews.md": {
      "get": {
        "operationId": "reviewsMarkdown",
        "summary": "Public review feed as Markdown. Comments are fenced as text. Free.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/reviews.md'"
          }
        ],
        "responses": {
          "200": {
            "description": "Markdown feed. The comment is not rendered as HTML.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                },
                "example": "# Reviews\n\nRating 5. Route /v1/search.\n"
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/verify": {
      "get": {
        "summary": "Unpaid GET is the 1000 sat or 1.00 USD challenge. POST the JSON body to run a verification. A paid GET is HTTP 400 and does not spend the payment.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/verify'"
          }
        ],
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "1000",
              "currency": "BTC",
              "description": "amount is 1000 satoshis of BTC, not 1000 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. One verification of a public provider URL."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "1.00",
              "currency": "USD",
              "description": "amount is 1.00 USDC on Base, not satoshis and not a credit bundle. One verification of a public provider URL. Payment rail: x402. Network eip155:8453. Atomic amount 1000000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "1.00"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 1000,
          "price_usd": "1.00",
          "unit": "One provider verification."
        },
        "responses": {
          "400": {
            "description": "A payment credential was checked and not spent. Use POST for the body this route requires.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "verify_invalid",
                  "detail": "POST a JSON body. url is required."
                }
              }
            }
          },
          "402": {
            "description": "Unpaid GET or HEAD. L402 WWW-Authenticate and, when x402 is on, PAYMENT-REQUIRED at this price. The JSON body has usage for the POST.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "price": {
                    "amount_sats": 1000,
                    "currency": "BTC"
                  },
                  "usage": {
                    "method": "POST",
                    "params": {
                      "url": "required"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Pay for a provider verification at https://api.agentpaywire.com/v1/verify. 1000 sats or 1.00 USD. Listing stays free.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i -X POST 'https://api.agentpaywire.com/v1/verify' \\\n  -H 'content-type: application/json' \\\n  -d '{\"url\":\"https://api.example.com/v1/search\",\"protocol\":\"l402\"}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "protocol": {
                    "type": "string",
                    "enum": [
                      "l402",
                      "x402",
                      "mpp"
                    ]
                  },
                  "library_id": {
                    "type": "string"
                  },
                  "contact": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "url": "https://api.example.com/v1/search",
                "protocol": "l402"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification report. payment does not change library order.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "id": "00000000-0000-4000-8000-000000000001",
                  "status": "passed",
                  "paid_verification": true
                }
              }
            }
          },
          "402": {
            "description": "Payment required. L402 challenge and, when x402 is configured, PAYMENT-REQUIRED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "price": {
                    "amount_sats": 1000,
                    "currency": "BTC"
                  }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "1000",
              "currency": "BTC",
              "description": "amount is 1000 satoshis of BTC, not 1000 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. One verification of a public provider URL."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "1.00",
              "currency": "USD",
              "description": "amount is 1.00 USDC on Base, not satoshis and not a credit bundle. One verification of a public provider URL. Payment rail: x402. Network eip155:8453. Atomic amount 1000000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "1.00"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 1000,
          "price_usd": "1.00",
          "unit": "One provider verification."
        }
      }
    },
    "/v1/verify/{id}": {
      "get": {
        "summary": "Free verification status.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/verify/{id}'"
          }
        ],
        "responses": {
          "200": {
            "description": "Free verification status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "00000000-0000-4000-8000-000000000001"
          }
        ],
        "security": []
      }
    },
    "/v1/check": {
      "get": {
        "summary": "Check a public payment URL. Two free reports per client per 24 hours once url is present, then 50 sats or 0.05 USD. An unpaid GET, HEAD, or POST without url is HTTP 402 at that price, with a usage hint, and does not use a free report. A paid GET without url is HTTP 400 and does not spend the payment. report.protocol lists passing challenge ids in the order l402, x402, mpp, joined with +, or null when none pass.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/check?url=https://api.example.com/pay'"
          }
        ],
        "responses": {
          "200": {
            "description": "Check a public payment URL. Two free reports per client per 24 hours once url is present, then 50 sats or 0.05 USD. An unpaid GET, HEAD, or POST without url is HTTP 402 at that price, with a usage hint, and does not use a free report. A paid GET without url is HTTP 400 and does not spend the payment. report.protocol lists passing challenge ids in the order l402, x402, mpp, joined with +, or null when none pass.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "protocol": "l402+x402",
                  "checks": [
                    {
                      "id": "l402",
                      "pass": true
                    },
                    {
                      "id": "x402",
                      "pass": true
                    }
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment required. L402 challenge and, when x402 is configured, PAYMENT-REQUIRED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "price": {
                    "amount_sats": 1000,
                    "currency": "BTC"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "50",
              "currency": "BTC",
              "description": "amount is 50 satoshis of BTC, not 50 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. One endpoint report after 2 free reports per client per 24 hours."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.05",
              "currency": "USD",
              "description": "amount is 0.05 USDC on Base, not satoshis and not a credit bundle. One endpoint report after 2 free reports per client per 24 hours. Payment rail: x402. Network eip155:8453. Atomic amount 50000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.05"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 50,
          "price_usd": "0.05",
          "unit": "One report after 2 free reports per client per 24 hours.",
          "free_per_24h": 2
        }
      },
      "post": {
        "summary": "Same check as GET /v1/check. Body field url, or the url query. report.protocol lists passing challenge ids in the order l402, x402, mpp, joined with +, or null when none pass.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i -X POST 'https://api.agentpaywire.com/v1/check' \\\n  -H 'content-type: application/json' \\\n  -d '{\"url\":\"https://api.example.com/pay\"}'"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              },
              "example": {
                "url": "https://api.example.com/pay"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Structured pass/fail report. protocol is l402, x402, mpp, or those ids joined with +.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "protocol": "l402+x402",
                  "checks": [
                    {
                      "id": "l402",
                      "pass": true
                    },
                    {
                      "id": "x402",
                      "pass": true
                    }
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Free reports used. Payment required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "price": {
                    "amount_sats": 50,
                    "currency": "BTC"
                  }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "50",
              "currency": "BTC",
              "description": "amount is 50 satoshis of BTC, not 50 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. One endpoint report after 2 free reports per client per 24 hours."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.05",
              "currency": "USD",
              "description": "amount is 0.05 USDC on Base, not satoshis and not a credit bundle. One endpoint report after 2 free reports per client per 24 hours. Payment rail: x402. Network eip155:8453. Atomic amount 50000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.05"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 50,
          "price_usd": "0.05",
          "unit": "One report after 2 free reports per client per 24 hours.",
          "free_per_24h": 2
        }
      }
    },
    "/v1/alerts": {
      "get": {
        "summary": "Unpaid GET is the 2000 sat or 2.00 USD challenge for 30 days. POST webhook_url and topics to subscribe. A paid GET is HTTP 400 and does not spend the payment.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/alerts'"
          }
        ],
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "2000",
              "currency": "BTC",
              "description": "amount is 2000 satoshis of BTC, not 2000 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. One subscription for 30 days."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "2.00",
              "currency": "USD",
              "description": "amount is 2.00 USDC on Base, not satoshis and not a credit bundle. One subscription for 30 days. Payment rail: x402. Network eip155:8453. Atomic amount 2000000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "2.00"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 2000,
          "price_usd": "2.00",
          "unit": "Signed webhooks for 30 days.",
          "ttl_days": 30
        },
        "responses": {
          "400": {
            "description": "A payment credential was checked and not spent. Use POST for the body this route requires.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "alerts_invalid",
                  "detail": "POST a JSON body with webhook_url and topics."
                }
              }
            }
          },
          "402": {
            "description": "Unpaid GET or HEAD. L402 WWW-Authenticate and, when x402 is on, PAYMENT-REQUIRED at this price. The JSON body has usage for the POST.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "price": {
                    "amount_sats": 2000,
                    "currency": "BTC"
                  },
                  "usage": {
                    "method": "POST",
                    "params": {
                      "webhook_url": "required",
                      "topics": "required"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Subscribe to signed webhooks for 30 days. 2000 sats or 2.00 USD. The token and HMAC secret are returned once.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i -X POST 'https://api.agentpaywire.com/v1/alerts' \\\n  -H 'content-type: application/json' \\\n  -d '{\"webhook_url\":\"https://example.com/hooks/apw\",\"topics\":[\"sdk-security\"]}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "webhook_url",
                  "topics"
                ],
                "properties": {
                  "webhook_url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "topics": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "sdk-security",
                        "lightning-releases",
                        "lightning-wallets",
                        "protocol-specs"
                      ]
                    }
                  }
                }
              },
              "example": {
                "webhook_url": "https://example.com/hooks/apw",
                "topics": [
                  "sdk-security"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Subscription. token and secret are returned once.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "id": "00000000-0000-4000-8000-000000000002",
                  "token": "apw_a_example",
                  "secret": "returned-once"
                }
              }
            }
          },
          "402": {
            "description": "Payment required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "price": {
                    "amount_sats": 2000,
                    "currency": "BTC"
                  }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "2000",
              "currency": "BTC",
              "description": "amount is 2000 satoshis of BTC, not 2000 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. One subscription for 30 days."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "2.00",
              "currency": "USD",
              "description": "amount is 2.00 USDC on Base, not satoshis and not a credit bundle. One subscription for 30 days. Payment rail: x402. Network eip155:8453. Atomic amount 2000000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "2.00"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 2000,
          "price_usd": "2.00",
          "unit": "Signed webhooks for 30 days.",
          "ttl_days": 30
        }
      }
    },
    "/v1/alerts/topics": {
      "get": {
        "summary": "Free list of alert topics.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/alerts/topics'"
          }
        ],
        "responses": {
          "200": {
            "description": "Free list of alert topics.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/alerts/{id}": {
      "get": {
        "summary": "Read one subscription. Requires the subscription token.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/alerts/{id}'"
          }
        ],
        "responses": {
          "200": {
            "description": "Read one subscription. Requires the subscription token.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "00000000-0000-4000-8000-000000000001"
          }
        ],
        "security": [
          {
            "AlertToken": []
          }
        ]
      },
      "delete": {
        "summary": "Cancel a subscription. Requires the subscription token.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "00000000-0000-4000-8000-000000000001"
          }
        ],
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i -X DELETE 'https://api.agentpaywire.com/v1/alerts/{id}' \\\n  -H 'Authorization: Bearer apw_a_example'"
          }
        ],
        "responses": {
          "200": {
            "description": "Cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "id": "00000000-0000-4000-8000-000000000002",
                  "status": "cancelled"
                }
              }
            }
          }
        }
      }
    },
    "/v1/alerts/{id}/test": {
      "post": {
        "summary": "Free signed test delivery. Requires the subscription token. No dataset changed.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "00000000-0000-4000-8000-000000000001"
          }
        ],
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i -X POST 'https://api.agentpaywire.com/v1/alerts/{id}/test' \\\n  -H 'Authorization: Bearer apw_a_example'"
          }
        ],
        "responses": {
          "200": {
            "description": "The webhook returned 2xx.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "delivered": true
                }
              }
            }
          },
          "502": {
            "description": "The webhook was not delivered.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "webhook_failed"
                }
              }
            }
          }
        }
      }
    },
    "/v1/credits": {
      "get": {
        "summary": "Unpaid GET is the 100-call challenge: 800 sats or 0.80 USD. POST calls 15, 100, or 1000. The 15-call pack is 120 sats or 0.12 USD. The 1000-call pack is 7000 sats or 7.00 USD. A paid GET is HTTP 400 and does not mint a token or spend the payment.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/credits'"
          }
        ],
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "800",
              "currency": "BTC",
              "description": "amount is 800 satoshis of BTC, not 800 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. The unpaid challenge is the 100-call pack: 800 sats or 0.80 USD, valid 90 days. POST calls 15 is 120 sats or 0.12 USD. POST calls 1000 is 7000 sats or 7.00 USD."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.80",
              "currency": "USD",
              "description": "amount is 0.80 USDC on Base, not satoshis and not a credit bundle. The unpaid challenge is the 100-call pack: 800 sats or 0.80 USD, valid 90 days. POST calls 15 is 120 sats or 0.12 USD. POST calls 1000 is 7000 sats or 7.00 USD. Payment rail: x402. Network eip155:8453. Atomic amount 800000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.80"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 800,
          "price_usd": "0.80",
          "unit": "100 prepaid calls for 90 days. POST calls 15 is 120 sats or 0.12 USD. POST calls 1000 is 7000 sats or 7.00 USD.",
          "calls": 100,
          "days": 90
        },
        "responses": {
          "400": {
            "description": "A payment credential was checked and not spent. Use POST for the body this route requires.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "credits_invalid",
                  "detail": "POST a JSON body. calls must be 15, 100, or 1000."
                }
              }
            }
          },
          "402": {
            "description": "Unpaid GET or HEAD. L402 WWW-Authenticate and, when x402 is on, PAYMENT-REQUIRED at this price. The JSON body has usage for the POST.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "price": {
                    "amount_sats": 800,
                    "currency": "BTC"
                  },
                  "usage": {
                    "method": "POST",
                    "packs": [
                      {
                        "calls": 100,
                        "sats": 800,
                        "usd": "0.80"
                      },
                      {
                        "calls": 1000,
                        "sats": 7000,
                        "usd": "7.00"
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Buy a prepaid bearer token for paid routes. 100 calls for 0.80 USD or 800 sats. 1000 calls for 7.00 USD or 7000 sats. Valid 90 days.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i -X POST 'https://api.agentpaywire.com/v1/credits' \\\n  -H 'content-type: application/json' \\\n  -d '{\"calls\":100}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "calls"
                ],
                "properties": {
                  "calls": {
                    "type": "integer",
                    "enum": [
                      15,
                      100,
                      1000
                    ]
                  }
                }
              },
              "example": {
                "calls": 100
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Token returned once. Later responses include credits_remaining.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "token": "apw_c_example",
                  "calls": 100,
                  "credits_remaining": 100
                }
              }
            }
          },
          "402": {
            "description": "Payment required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "price": {
                    "amount_sats": 800,
                    "currency": "BTC"
                  }
                }
              }
            }
          }
        },
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "800",
              "currency": "BTC",
              "description": "amount is 800 satoshis of BTC, not 800 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. 15 calls is 120 sats or 0.12 USD. 100 calls is 800 sats or 0.80 USD. 1000 calls is 7000 sats or 7.00 USD. Packs last 90 days. The unpaid challenge shows the 100-call pack."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.80",
              "currency": "USD",
              "description": "amount is 0.80 USDC on Base, not satoshis and not a credit bundle. 15 calls is 120 sats or 0.12 USD. 100 calls is 800 sats or 0.80 USD. 1000 calls is 7000 sats or 7.00 USD. Packs last 90 days. The unpaid challenge shows the 100-call pack. Payment rail: x402. Network eip155:8453. Atomic amount 800000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "dynamic",
            "currency": "USD",
            "min": "0.12",
            "max": "7.00"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 800,
          "price_usd": "0.80",
          "unit": "15 calls for 120 sats or 0.12 USD, 100 calls for 800 sats or 0.80 USD, or 1000 calls for 7000 sats or 7.00 USD. Valid 90 days.",
          "calls": 100,
          "days": 90,
          "packs": [
            {
              "calls": 15,
              "price_sats": 120,
              "price_usd": "0.12",
              "days": 90
            },
            {
              "calls": 100,
              "price_sats": 800,
              "price_usd": "0.80",
              "days": 90
            },
            {
              "calls": 1000,
              "price_sats": 7000,
              "price_usd": "7.00",
              "days": 90
            }
          ]
        }
      }
    },
    "/v1/credits/me": {
      "get": {
        "summary": "Free balance check. Does not spend a call. Send Authorization: Bearer or X-APW-Credits.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -i 'https://api.agentpaywire.com/v1/credits/me'"
          }
        ],
        "responses": {
          "200": {
            "description": "Free balance check. Does not spend a call. Send Authorization: Bearer or X-APW-Credits.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true
                }
              }
            }
          }
        },
        "security": [
          {
            "PrepaidCredits": []
          }
        ]
      }
    },
    "/v1/tools/hash": {
      "post": {
        "operationId": "tool_hash",
        "summary": "Hash text with sha256, sha512, keccak256, or blake3.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -sS -X POST 'https://api.agentpaywire.com/v1/tools/hash' -H 'content-type: application/json' -d '{\"algorithm\":\"sha256\",\"text\":\"agentpaywire\"}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "algorithm": "sha256",
                "text": "agentpaywire"
              }
            }
          }
        },
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "1",
              "currency": "BTC",
              "description": "amount is 1 satoshis of BTC, not 1 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.001",
              "currency": "USD",
              "description": "amount is 0.001 USDC on Base, not satoshis and not a credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker. Payment rail: x402. Network eip155:8453. Atomic amount 1000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 1,
          "price_usd": "0.001",
          "unit": "One local tool call."
        },
        "responses": {
          "200": {
            "description": "Tool result. credits_remaining is present when a pack bearer paid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "algorithm": "sha256",
                  "text": "agentpaywire",
                  "eighths": 1
                }
              }
            }
          },
          "402": {
            "description": "Payment required. The example in usage is free to read.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "usage": {
                    "example": {
                      "algorithm": "sha256",
                      "text": "agentpaywire"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/encode": {
      "post": {
        "operationId": "tool_encode",
        "summary": "Encode text as base64, base64url, hex, or url.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -sS -X POST 'https://api.agentpaywire.com/v1/tools/encode' -H 'content-type: application/json' -d '{\"encoding\":\"base64\",\"text\":\"agentpaywire\"}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "encoding": "base64",
                "text": "agentpaywire"
              }
            }
          }
        },
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "1",
              "currency": "BTC",
              "description": "amount is 1 satoshis of BTC, not 1 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.001",
              "currency": "USD",
              "description": "amount is 0.001 USDC on Base, not satoshis and not a credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker. Payment rail: x402. Network eip155:8453. Atomic amount 1000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 1,
          "price_usd": "0.001",
          "unit": "One local tool call."
        },
        "responses": {
          "200": {
            "description": "Tool result. credits_remaining is present when a pack bearer paid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "encoding": "base64",
                  "text": "agentpaywire",
                  "eighths": 1
                }
              }
            }
          },
          "402": {
            "description": "Payment required. The example in usage is free to read.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "usage": {
                    "example": {
                      "encoding": "base64",
                      "text": "agentpaywire"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/decode": {
      "post": {
        "operationId": "tool_decode",
        "summary": "Decode base64, base64url, hex, or url text.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -sS -X POST 'https://api.agentpaywire.com/v1/tools/decode' -H 'content-type: application/json' -d '{\"encoding\":\"hex\",\"text\":\"6167\"}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "encoding": "hex",
                "text": "6167"
              }
            }
          }
        },
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "1",
              "currency": "BTC",
              "description": "amount is 1 satoshis of BTC, not 1 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.001",
              "currency": "USD",
              "description": "amount is 0.001 USDC on Base, not satoshis and not a credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker. Payment rail: x402. Network eip155:8453. Atomic amount 1000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 1,
          "price_usd": "0.001",
          "unit": "One local tool call."
        },
        "responses": {
          "200": {
            "description": "Tool result. credits_remaining is present when a pack bearer paid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "encoding": "hex",
                  "text": "6167",
                  "eighths": 1
                }
              }
            }
          },
          "402": {
            "description": "Payment required. The example in usage is free to read.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "usage": {
                    "example": {
                      "encoding": "hex",
                      "text": "6167"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/validate": {
      "post": {
        "operationId": "tool_validate",
        "summary": "Validate JSON, a small JSON Schema, an EVM checksum, a BTC address, an email, a URL, or an IBAN.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -sS -X POST 'https://api.agentpaywire.com/v1/tools/validate' -H 'content-type: application/json' -d '{\"kind\":\"iban\",\"text\":\"GB82WEST12345698765432\"}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "kind": "iban",
                "text": "GB82WEST12345698765432"
              }
            }
          }
        },
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "1",
              "currency": "BTC",
              "description": "amount is 1 satoshis of BTC, not 1 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.001",
              "currency": "USD",
              "description": "amount is 0.001 USDC on Base, not satoshis and not a credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker. Payment rail: x402. Network eip155:8453. Atomic amount 1000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 1,
          "price_usd": "0.001",
          "unit": "One local tool call."
        },
        "responses": {
          "200": {
            "description": "Tool result. credits_remaining is present when a pack bearer paid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "kind": "iban",
                  "text": "GB82WEST12345698765432",
                  "eighths": 1
                }
              }
            }
          },
          "402": {
            "description": "Payment required. The example in usage is free to read.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "usage": {
                    "example": {
                      "kind": "iban",
                      "text": "GB82WEST12345698765432"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/convert": {
      "post": {
        "operationId": "tool_convert",
        "summary": "Convert wei/gwei/eth, sats/btc, USDC decimals, or unix/iso.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -sS -X POST 'https://api.agentpaywire.com/v1/tools/convert' -H 'content-type: application/json' -d '{\"amount\":\"1\",\"from\":\"gwei\",\"to\":\"wei\"}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "amount": "1",
                "from": "gwei",
                "to": "wei"
              }
            }
          }
        },
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "1",
              "currency": "BTC",
              "description": "amount is 1 satoshis of BTC, not 1 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.001",
              "currency": "USD",
              "description": "amount is 0.001 USDC on Base, not satoshis and not a credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker. Payment rail: x402. Network eip155:8453. Atomic amount 1000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 1,
          "price_usd": "0.001",
          "unit": "One local tool call."
        },
        "responses": {
          "200": {
            "description": "Tool result. credits_remaining is present when a pack bearer paid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "amount": "1",
                  "from": "gwei",
                  "to": "wei",
                  "eighths": 1
                }
              }
            }
          },
          "402": {
            "description": "Payment required. The example in usage is free to read.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "usage": {
                    "example": {
                      "amount": "1",
                      "from": "gwei",
                      "to": "wei"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/id": {
      "post": {
        "operationId": "tool_id",
        "summary": "Mint a UUID or a ULID.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -sS -X POST 'https://api.agentpaywire.com/v1/tools/id' -H 'content-type: application/json' -d '{\"kind\":\"uuid\"}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "kind": "uuid"
              }
            }
          }
        },
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "1",
              "currency": "BTC",
              "description": "amount is 1 satoshis of BTC, not 1 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.001",
              "currency": "USD",
              "description": "amount is 0.001 USDC on Base, not satoshis and not a credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker. Payment rail: x402. Network eip155:8453. Atomic amount 1000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 1,
          "price_usd": "0.001",
          "unit": "One local tool call."
        },
        "responses": {
          "200": {
            "description": "Tool result. credits_remaining is present when a pack bearer paid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "kind": "uuid",
                  "eighths": 1
                }
              }
            }
          },
          "402": {
            "description": "Payment required. The example in usage is free to read.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "usage": {
                    "example": {
                      "kind": "uuid"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/calc": {
      "post": {
        "operationId": "tool_calc",
        "summary": "Evaluate numbers with + - * / % and parentheses.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -sS -X POST 'https://api.agentpaywire.com/v1/tools/calc' -H 'content-type: application/json' -d '{\"expression\":\"1+2*3\"}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "expression": "1+2*3"
              }
            }
          }
        },
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "1",
              "currency": "BTC",
              "description": "amount is 1 satoshis of BTC, not 1 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.001",
              "currency": "USD",
              "description": "amount is 0.001 USDC on Base, not satoshis and not a credit bundle. One eighth of a prepaid credit, or 1 sat, or 0.001 USDC. The work stays inside the worker. Payment rail: x402. Network eip155:8453. Atomic amount 1000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 1,
          "price_usd": "0.001",
          "unit": "One local tool call."
        },
        "responses": {
          "200": {
            "description": "Tool result. credits_remaining is present when a pack bearer paid.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "expression": "1+2*3",
                  "eighths": 1
                }
              }
            }
          },
          "402": {
            "description": "Payment required. The example in usage is free to read.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "usage": {
                    "example": {
                      "expression": "1+2*3"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/markdown": {
      "post": {
        "operationId": "fetchMarkdown",
        "summary": "Fetch one public http(s) page and return markdown. robots.txt is respected. Private addresses are blocked. A failed fetch is not charged.",
        "x-code-samples": [
          {
            "lang": "curl",
            "label": "Request",
            "source": "curl -sS -X POST 'https://api.agentpaywire.com/v1/markdown' -H 'content-type: application/json' -d '{\"url\":\"https://agentpaywire.com/llms.txt\"}'"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ]
              },
              "example": {
                "url": "https://agentpaywire.com/llms.txt"
              }
            }
          }
        },
        "x-payment-info": {
          "offers": [
            {
              "method": "l402",
              "intent": "one-time",
              "amount": "3",
              "currency": "BTC",
              "description": "amount is 3 satoshis of BTC, not 3 bitcoin. Payment rail: Lightning. One payment buys this product, not the catalog credit bundle. Three eighths of a prepaid credit, or 3 sats, or 0.003 USDC. Charge happens after the page converts."
            },
            {
              "method": "x402",
              "intent": "one-time",
              "amount": "0.003",
              "currency": "USD",
              "description": "amount is 0.003 USDC on Base, not satoshis and not a credit bundle. Three eighths of a prepaid credit, or 3 sats, or 0.003 USDC. Charge happens after the page converts. Payment rail: x402. Network eip155:8453. Atomic amount 3000. Asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Retry with PAYMENT-SIGNATURE. A v1 client may send X-PAYMENT."
            }
          ],
          "protocols": [
            "L402",
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.003"
          },
          "protocol": "L402",
          "payment": "Lightning",
          "asset": "BTC",
          "price_sats": 3,
          "price_usd": "0.003",
          "unit": "One public page."
        },
        "responses": {
          "200": {
            "description": "Markdown for the final URL.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "url": "https://agentpaywire.com/llms.txt",
                  "markdown": "# Agent Paywire",
                  "eighths": 3,
                  "cached": false
                }
              }
            }
          },
          "402": {
            "description": "Payment required before the fetch.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "error": "payment_required",
                  "usage": {
                    "example": {
                      "url": "https://agentpaywire.com/llms.txt"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
