{
  "openapi": "3.0.3",
  "info": {
    "title": "Peek API",
    "version": "1.1.0",
    "description": "Link-preview metadata + page-to-markdown. Free tier 50/day per IP; beyond that pay-per-call via x402 (USDC on Base, no signup, no API key)."
  },
  "servers": [
    {
      "url": "https://smeltworks.com/peek"
    }
  ],
  "paths": {
    "/v1/preview": {
      "get": {
        "summary": "Link-preview metadata for a URL ($0.001)",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Target URL to fetch"
          }
        ],
        "responses": {
          "200": {
            "description": "metadata JSON"
          },
          "402": {
            "description": "x402 payment required"
          }
        }
      }
    },
    "/v1/markdown": {
      "get": {
        "summary": "Page to clean markdown ($0.002)",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Target URL to fetch"
          }
        ],
        "responses": {
          "200": {
            "description": "{url,title,markdown}"
          },
          "402": {
            "description": "x402 payment required"
          }
        }
      }
    },
    "/v1/pricing": {
      "get": {
        "summary": "Pricing info",
        "responses": {
          "200": {
            "description": "pricing JSON"
          }
        }
      }
    }
  }
}