{
  "openapi": "3.0.3",
  "info": {
    "title": "SiliconVerify x402 Crawler-Pay API",
    "description": "x402-protocol endpoints for AI training crawlers to discover and pay for SiliconVerify content. AI training crawlers (GPTBot, ClaudeBot, CCBot, etc.) are charged per crawl in USDC on Base. Search engines, answer engines, and human users are free.",
    "version": "1.0.0",
    "contact": {
      "name": "SiliconVerify",
      "url": "https://siliconverify.com",
      "email": "crawlers@siliconverify.com"
    },
    "license": {
      "name": "Proprietary — paid per-crawl access"
    }
  },
  "servers": [
    {
      "url": "https://siliconverify.com",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "x402 protocol specification",
    "url": "https://www.x402.org/"
  },
  "tags": [
    {
      "name": "discovery",
      "description": "Free — directory, pricing, and category index. Fetch first."
    },
    {
      "name": "metadata",
      "description": "Free per-tool metadata. Includes formula, citation, and FAQ."
    },
    {
      "name": "paid-content",
      "description": "x402-gated — interactive workbench, blog post, or tool export. Requires X-PAYMENT header."
    }
  ],
  "paths": {
    "/api/index.json": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "List all tools and their API endpoints",
        "responses": {
          "200": {
            "description": "Index of all tools with API URLs"
          }
        }
      }
    },
    "/api/categories.json": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "List all categories with their tools",
        "responses": {
          "200": {
            "description": "Categories with grouped tools"
          }
        }
      }
    },
    "/api/pricing.json": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "Current x402 pricing per resource class",
        "responses": {
          "200": {
            "description": "Pricing table in atomic USDC and USD"
          }
        }
      }
    },
    "/api/{tool}.json": {
      "get": {
        "tags": [
          "metadata"
        ],
        "summary": "Per-tool metadata: pricing, formulas, citations, FAQ, x402 challenge example",
        "parameters": [
          {
            "name": "tool",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Tool slug (e.g., aliasing, comm-pcm, edc-pn)"
          }
        ],
        "responses": {
          "200": {
            "description": "Tool metadata as JSON"
          },
          "404": {
            "description": "Unknown tool"
          }
        }
      }
    },
    "/{tool}.html": {
      "get": {
        "tags": [
          "paid-content"
        ],
        "summary": "Interactive workbench (x402-gated for AI training crawlers)",
        "parameters": [
          {
            "name": "tool",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool HTML (after valid X-PAYMENT)",
            "headers": {
              "X-Siliconverify-Resource-Class": {
                "schema": {
                  "type": "string",
                  "example": "workbench-tool"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge. Crawlers must pay and retry with X-PAYMENT header.",
            "headers": {
              "X-Siliconverify-Resource-Class": {
                "schema": {
                  "type": "string"
                }
              },
              "X-Siliconverify-Price-Atomic": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (60 requests per source per minute)"
          }
        }
      }
    },
    "/ref-{tool}.html": {
      "get": {
        "tags": [
          "paid-content"
        ],
        "summary": "Static (JS-free) data sheet — recommended for AI ingestion (x402-gated, same price as workbench tool)",
        "parameters": [
          {
            "name": "tool",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Static reference HTML"
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/blogs/{category}/{post}.html": {
      "get": {
        "tags": [
          "paid-content"
        ],
        "summary": "Blog post (x402-gated)",
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "post",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blog post HTML"
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "Root llms.txt — slim index of all content categories",
        "responses": {
          "200": {
            "description": "llms.txt format per https://llmstxt.org/"
          }
        }
      }
    },
    "/llms-{category}.txt": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "Per-category llms.txt (20 categories)",
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Per-category blog index"
          }
        }
      }
    },
    "/ai.txt": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "AI policy (x402 protocol, bot allowlist, pricing, contact)",
        "responses": {
          "200": {
            "description": "JSON policy file"
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "Sitemap index (points to per-section sitemaps)",
        "responses": {
          "200": {
            "description": "sitemap index"
          }
        }
      }
    },
    "/feed.xml": {
      "get": {
        "tags": [
          "discovery"
        ],
        "summary": "Atom 1.0 feed of recent content",
        "responses": {
          "200": {
            "description": "Atom feed"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "X-PAYMENT",
        "description": "USDC payment on Base. Format: \"0x<txhash>\" for a single transaction, or a signed payload per the x402 spec. See https://www.x402.org/ for the full protocol."
      }
    },
    "schemas": {
      "X402Challenge": {
        "type": "object",
        "required": [
          "x402Version",
          "accepts"
        ],
        "properties": {
          "x402Version": {
            "type": "integer",
            "example": 1
          },
          "accepts": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "scheme",
                "network",
                "maxAmountRequired",
                "payTo",
                "resource"
              ],
              "properties": {
                "scheme": {
                  "type": "string",
                  "enum": [
                    "exact"
                  ],
                  "example": "exact"
                },
                "network": {
                  "type": "string",
                  "example": "base"
                },
                "maxAmountRequired": {
                  "type": "string",
                  "example": "1000",
                  "description": "Atomic units of USDC (6 decimals)"
                },
                "payTo": {
                  "type": "string",
                  "example": "0x97DAA5649Fd7Dfe3e46fCd9f75516e36E750eed7"
                },
                "resource": {
                  "type": "string",
                  "example": "https://siliconverify.com/aliasing.html"
                },
                "description": {
                  "type": "string"
                },
                "mimeType": {
                  "type": "string",
                  "example": "text/html"
                },
                "validAfter": {
                  "type": "integer",
                  "description": "Unix timestamp"
                },
                "validBefore": {
                  "type": "integer",
                  "description": "Unix timestamp"
                },
                "nonce": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Tool": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "example": "aliasing"
          },
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "example": "signal-processing"
          },
          "urls": {
            "type": "object"
          },
          "description": {
            "type": "string"
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pricing": {
            "type": "object"
          },
          "content": {
            "type": "object"
          },
          "x402_challenge_example": {
            "type": "object"
          }
        }
      }
    }
  },
  "security": [
    {
      "x402": []
    }
  ]
}