{
  "openapi": "3.1.0",
  "info": {
    "title": "C6 — Pay-Per-Crawl Guard (house content, licensed per page)",
    "version": "1.0.0",
    "description": "A licensed shelf of house-authored pages that programs pay to read, per page. POST /catalog ($0.01 USDC) returns shelf metadata — slugs, titles, categories, summaries, word counts — never page text. POST /read ($0.05 USDC) returns ONE full page under a per-read license (use it in your own work for your user; resale and republication of the full text are not licensed). Unpaid crawlers are fenced out: every content route answers 402 with x402 PaymentRequirements until a verified payment arrives. Dual x402 rail (v1 via X-PAYMENT, v2 via PAYMENT-SIGNATURE), exact scheme, USDC on Base."
  },
  "servers": [
    {
      "url": "https://tap-c6-crawl-guard.vercel.app"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Liveness + prices + live-state",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/catalog": {
      "post": {
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "summary": "Browse the licensed shelf (metadata + summaries only) — $0.01",
        "parameters": [
          {
            "name": "X-PAYMENT",
            "in": "header",
            "required": false,
            "description": "x402 PaymentPayload (base64 JSON). Absent → 402 with PaymentRequirements.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "description": "Service API key (API-key channel; not needed for paid calls).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "Optional topic filter, e.g. 'scam patterns' — returns matching pages' metadata, honestly empty when nothing matches."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Page metadata list + license terms + disclaimer (NO page bodies)"
          },
          "401": {
            "description": "unauthorized (API-key channel only)"
          },
          "402": {
            "description": "Payment required (x402 PaymentRequirements body, maxAmountRequired 10000)"
          },
          "501": {
            "description": "payments_not_configured (fail-closed)"
          }
        }
      }
    },
    "/read": {
      "post": {
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.050000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "summary": "Read one full licensed page — $0.05",
        "parameters": [
          {
            "name": "X-PAYMENT",
            "in": "header",
            "required": false,
            "description": "x402 PaymentPayload (base64 JSON). Absent → 402 with PaymentRequirements.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "description": "Service API key (API-key channel; not needed for paid calls).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "description": "The page slug from POST /catalog, e.g. 'pay-per-crawl-principles'."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Full page text + word count + per-read license + disclaimer"
          },
          "401": {
            "description": "unauthorized (API-key channel only)"
          },
          "402": {
            "description": "Payment required (x402 PaymentRequirements body, maxAmountRequired 50000)"
          },
          "404": {
            "description": "page_not_found (honest miss, available slugs listed)"
          },
          "501": {
            "description": "payments_not_configured (fail-closed)"
          }
        }
      }
    }
  }
}