{
  "openapi": "3.1.0",
  "info": {
    "title": "Winthropic Index API",
    "version": "1.0.0",
    "description": "Read access to the Winthropic Index: independent daily evaluations of Claude models on a fixed battery. Free. Not affiliated with Anthropic."
  },
  "servers": [
    {
      "url": "https://winthropic.com"
    }
  ],
  "paths": {
    "/api/index.json": {
      "get": {
        "summary": "All readings: dates, per-model series, latest scores",
        "responses": {
          "200": {
            "description": "Index summary",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/audit": {
      "post": {
        "summary": "Machine-buyable Token Audit: POST a usage CSV (text/csv, or JSON {\"csv\": \"...\"}) — returns a free teaser and HTTP 402 with payment rails (Stripe checkout; L402 Lightning where available)",
        "responses": {
          "400": {
            "description": "Unparseable CSV"
          },
          "402": {
            "description": "Teaser + payment required",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    },
    "/api/audit/{id}": {
      "get": {
        "summary": "Itemized audit findings as JSON once paid (Authorization: L402 <payment_hash>:<preimage>, or ?session_id= after Stripe checkout)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Full findings"
          },
          "402": {
            "description": "Payment still required"
          },
          "404": {
            "description": "Unknown or expired report"
          }
        }
      }
    },
    "/api/runs/{date}.json": {
      "get": {
        "summary": "Full raw record for one daily run, including per-task results",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Run record",
            "content": {
              "application/json": {}
            }
          },
          "404": {
            "description": "No run for that date"
          }
        }
      }
    }
  }
}