{
  "openapi": "3.1.0",
  "info": {
    "title": "SML Perpetual Roadmap API",
    "version": "1.0.0",
    "description": "AMC and GME 25-session price roadmaps from exact DTW historical-analog matching on real market data. Paid per call with x402 v2 (USDC on Base). Publisher: SCRIPTMASTERLABS.",
    "contact": {
      "name": "Script Master Labs LLC",
      "email": "ScriptMasterLabs@gmail.com",
      "url": "https://www.scriptmasterlabs.com"
    }
  },
  "servers": [
    {
      "url": "https://perpetual-roadmap-api.onrender.com"
    }
  ],
  "paths": {
    "/v1/roadmap/{symbol}": {
      "get": {
        "operationId": "getRoadmap",
        "summary": "Full roadmap run ($0.05 USDC via x402)",
        "description": "AMC or GME 25-session price roadmap for AI agents: exact subsequence-DTW match of the last 60 completed AMC or GME daily closes against a real regular-hours 1-hour archive, top-5 independent historical analogs, ensemble median/range per day, SML Coherent Gate verdict, data provenance and SHA-256 input hash. Real market data only.",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AMC",
                "GME"
              ]
            }
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "base64 x402 v2 payment payload"
          }
        ],
        "x-x402": {
          "price_usd": "0.05",
          "amount": "50000",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0xc29185fa176357612f3194735753e520e91adc46"
        },
        "responses": {
          "200": {
            "description": "Roadmap run; PAYMENT-RESPONSE header carries the settlement receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Payment required; PAYMENT-REQUIRED header (base64) carries x402 v2 terms",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "No current run (not charged); see Retry-After"
          }
        }
      }
    },
    "/v1/preview/{symbol}": {
      "get": {
        "operationId": "getPreview",
        "summary": "Free provenance preview",
        "parameters": [
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AMC",
                "GME"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Preview"
          },
          "503": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/status": {
      "get": {
        "operationId": "getStatus",
        "summary": "Free service and data status",
        "responses": {
          "200": {
            "description": "Status"
          }
        }
      }
    },
    "/.well-known/x402": {
      "get": {
        "operationId": "getX402Manifest",
        "summary": "x402 discovery manifest",
        "responses": {
          "200": {
            "description": "Manifest"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcp",
        "summary": "MCP (streamable HTTP, JSON-RPC 2.0): status, preview and payment-contract tools",
        "responses": {
          "200": {
            "description": "JSON-RPC response"
          }
        }
      }
    }
  }
}