{
  "openapi": "3.1.0",
  "info": {
    "title": "What Are The Odds",
    "version": "1.0.0",
    "description": "What Are The Odds by SCRIPTMASTERLABS returns one sourced prediction-market line from approved real books, or no_market. It never invents a percentage and never averages books into a synthetic midpoint."
  },
  "servers": [
    {
      "url": "https://squeezeos-api.onrender.com"
    }
  ],
  "paths": {
    "/v1/odds": {
      "get": {
        "operationId": "what_are_the_odds",
        "summary": "What Are The Odds",
        "description": "Ask a prediction-market odds question. Unsigned agent calls receive the canonical SqueezeOS x402 v2 payment challenge. Coinbase CDP verify and settlement complete before the answer engine executes. Browser-only ?free=1 preview is not settlement evidence.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "description": "Natural-language question such as: what are the odds of a rate hike"
          },
          {
            "name": "free",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["1"]
            },
            "description": "Browser-only free preview. Programmatic/agent clients remain x402-gated."
          }
        ],
        "responses": {
          "200": {
            "description": "Sourced What Are The Odds answer after canonical settlement, owner authorization, or explicit browser preview.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhatAreTheOddsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid query. No charge."
          },
          "402": {
            "description": "Canonical x402 v2 Base/USDC payment challenge. A 402 is not proof of settlement."
          },
          "503": {
            "description": "Canonical payment rail unavailable. No answer is released."
          }
        },
        "x-x402": {
          "version": 2,
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "USDC",
          "asset_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "pay_to": "0xc29185fa176357612f3194735753e520e91adc46",
          "price_usdc": "0.001",
          "amount_atomic": "1000",
          "facilitator": "Coinbase CDP",
          "challenge_header": "PAYMENT-REQUIRED",
          "request_header": "PAYMENT-SIGNATURE",
          "response_header": "PAYMENT-RESPONSE"
        }
      }
    }
  },
  "components": {
    "schemas": {
      "WhatAreTheOddsResponse": {
        "type": "object",
        "required": ["product", "status", "query", "line", "sources"],
        "properties": {
          "product": {
            "type": "string",
            "const": "What Are The Odds"
          },
          "status": {
            "type": "string",
            "enum": ["number", "disagree", "no_market"]
          },
          "query": {
            "type": "string"
          },
          "line": {
            "type": "string"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "venue": {"type": "string"},
                "contract": {"type": "string"},
                "probability_percent": {"type": "number"},
                "source_url": {"type": "string", "format": "uri"},
                "source_field": {"type": "string"}
              }
            }
          }
        }
      }
    }
  },
  "x-scriptmasterlabs-truth-contract": {
    "canonical_product_name": "What Are The Odds",
    "status_values": ["number", "disagree", "no_market"],
    "invent_percentages": false,
    "average_books": false,
    "disagree_threshold_percentage_points": 5,
    "no_market_is_valid": true
  }
}
