{
  "openapi": "3.1.0",
  "info": {
    "title": "Quickbrew.io API",
    "description": "Machine-to-machine data endpoints for autonomous agents using the x402 micropayment protocol on the Base L2 network.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.quickbrew.io",
      "description": "Production Edge Server"
    }
  ],
  "components": {
    "securitySchemes": {
      "x402_Payment_Tx": {
        "type": "apiKey",
        "in": "header",
        "name": "x-payment-tx",
        "description": "The transaction hash of the USDC payment on the Base L2 network sent to merchant wallet 0x63419c2d5d06795fec77c5d124e4779fdf279b16. If omitted, the server will return a 402 Payment Required error with the exact USDC price."
      }
    }
  },
  "security": [
    {
      "x402_Payment_Tx": []
    }
  ],
  "paths": {
    "/scrape": {
      "get": {
        "summary": "Clean Markdown Scraper",
        "description": "Strips HTML/CSS and returns raw, LLM-optimized Markdown text. Price: 0.001 USDC.",
        "operationId": "scrapeUrl",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "description": "The target URL to scrape."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful extraction",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "markdown": { "type": "string" },
                    "url": { "type": "string" },
                    "receipt": { "type": "string" }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        }
      }
    },
    "/condense": {
      "get": {
        "summary": "Context Condenser",
        "description": "Compresses long articles into dense bullet points using Meta Llama 4 Scout. Price: 0.005 USDC.",
        "operationId": "condenseUrl",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": { "type": "string", "format": "uri" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful condensation"
          },
          "402": { "description": "Payment Required" }
        }
      }
    },
    "/sentiment": {
      "get": {
        "summary": "Live Sentiment API",
        "description": "Extracts psychological tone, bias metrics, and primary emotions using Llama 4 JSON analysis. Price: 0.002 USDC.",
        "operationId": "analyzeSentiment",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": { "type": "string", "format": "uri" }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful sentiment analysis"
          },
          "402": { "description": "Payment Required" }
        }
      }
    }
  }
}