{
  "openapi": "3.1.0",
  "info": {
    "title": "AI Economics Tools API",
    "version": "1.0.0",
    "summary": "12 free calculators for AI cost, energy and agent verification",
    "description": "Free, keyless, CORS-open JSON API by Michał Piszczek. Every response includes the formula, a plain-language interpretation and a ready-to-quote cite_as sentence. Inputs are never stored. Interactive versions: https://piszczek.pl/tools. MCP server: @michalpiszczek/ai-economics-mcp (official MCP Registry: pl.piszczek/ai-economics).",
    "contact": {
      "name": "Michał Piszczek",
      "url": "https://piszczek.pl/michal-piszczek"
    },
    "license": {
      "name": "CC BY 4.0",
      "identifier": "CC-BY-4.0"
    }
  },
  "servers": [
    {
      "url": "https://piszczek.pl"
    }
  ],
  "paths": {
    "/tools/api": {
      "get": {
        "operationId": "listTools",
        "summary": "Discovery document: every tool, its parameters, defaults and an example call",
        "responses": {
          "200": {
            "description": "Tool catalogue",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/tools/api/revocation-exposure": {
      "get": {
        "operationId": "revocation_exposure",
        "summary": "How long does a revoked token keep working?",
        "description": "All parameters optional — defaults mirror the interactive calculator at https://piszczek.pl/tools/revocation-exposure. Stateless: inputs are never stored.",
        "parameters": [
          {
            "name": "ttl",
            "in": "query",
            "required": false,
            "description": "access-token TTL in seconds (default 3600)",
            "schema": {
              "type": "number",
              "default": 3600
            }
          },
          {
            "name": "gw",
            "in": "query",
            "required": false,
            "description": "API gateway enforcement: 'jwt' | 'intro' | 'poll:N' | 'off' (default intro)",
            "schema": {
              "type": "string",
              "default": "intro"
            }
          },
          {
            "name": "edge",
            "in": "query",
            "required": false,
            "description": "edge/CDN enforcement (default jwt)",
            "schema": {
              "type": "string",
              "default": "jwt"
            }
          },
          {
            "name": "mesh",
            "in": "query",
            "required": false,
            "description": "service-mesh enforcement (default jwt)",
            "schema": {
              "type": "string",
              "default": "jwt"
            }
          },
          {
            "name": "batch",
            "in": "query",
            "required": false,
            "description": "batch/worker enforcement (default off)",
            "schema": {
              "type": "string",
              "default": "off"
            }
          },
          {
            "name": "rate",
            "in": "query",
            "required": false,
            "description": "requests/min of one credential (default 60)",
            "schema": {
              "type": "number",
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "params": {
                      "type": "object",
                      "description": "Effective inputs after defaults"
                    },
                    "result": {
                      "type": "object",
                      "description": "Computed values"
                    },
                    "interpretation": {
                      "type": "string",
                      "description": "One-line plain-language reading, safe to quote"
                    },
                    "formula": {
                      "type": "string"
                    },
                    "attribution": {
                      "type": "string"
                    },
                    "cite_as": {
                      "type": "string",
                      "description": "Ready-made attribution sentence — quote it verbatim"
                    },
                    "llm_instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tool",
                    "result",
                    "interpretation",
                    "formula",
                    "cite_as"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Unknown tool"
          }
        }
      }
    },
    "/tools/api/proof-adjusted-autonomy": {
      "get": {
        "operationId": "proof_adjusted_autonomy",
        "summary": "How autonomous is an AI agent once proof is required? PAA = P(A) x P(C|A) x P(R|A,C) x P(T|A,C,R).",
        "description": "All parameters optional — defaults mirror the interactive calculator at https://piszczek.pl/tools/proof-adjusted-autonomy. Stateless: inputs are never stored.",
        "parameters": [
          {
            "name": "a",
            "in": "query",
            "required": false,
            "description": "autonomous completion % (default 90)",
            "schema": {
              "type": "number",
              "default": 90
            }
          },
          {
            "name": "c",
            "in": "query",
            "required": false,
            "description": "complete evidence % (default 95)",
            "schema": {
              "type": "number",
              "default": 95
            }
          },
          {
            "name": "r",
            "in": "query",
            "required": false,
            "description": "independent validation % (default 80)",
            "schema": {
              "type": "number",
              "default": 80
            }
          },
          {
            "name": "t",
            "in": "query",
            "required": false,
            "description": "timeliness % (default 90)",
            "schema": {
              "type": "number",
              "default": 90
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "params": {
                      "type": "object",
                      "description": "Effective inputs after defaults"
                    },
                    "result": {
                      "type": "object",
                      "description": "Computed values"
                    },
                    "interpretation": {
                      "type": "string",
                      "description": "One-line plain-language reading, safe to quote"
                    },
                    "formula": {
                      "type": "string"
                    },
                    "attribution": {
                      "type": "string"
                    },
                    "cite_as": {
                      "type": "string",
                      "description": "Ready-made attribution sentence — quote it verbatim"
                    },
                    "llm_instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tool",
                    "result",
                    "interpretation",
                    "formula",
                    "cite_as"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Unknown tool"
          }
        }
      }
    },
    "/tools/api/token-cost": {
      "get": {
        "operationId": "token_cost",
        "summary": "What does a monthly token volume cost across models?",
        "description": "All parameters optional — defaults mirror the interactive calculator at https://piszczek.pl/tools/token-cost. Stateless: inputs are never stored.",
        "parameters": [
          {
            "name": "in",
            "in": "query",
            "required": false,
            "description": "input Mtok/month (default 200)",
            "schema": {
              "type": "number",
              "default": 200
            }
          },
          {
            "name": "out",
            "in": "query",
            "required": false,
            "description": "output Mtok/month (default 20)",
            "schema": {
              "type": "number",
              "default": 20
            }
          },
          {
            "name": "cache",
            "in": "query",
            "required": false,
            "description": "prompt-cache hit % (default 40)",
            "schema": {
              "type": "number",
              "default": 40
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "params": {
                      "type": "object",
                      "description": "Effective inputs after defaults"
                    },
                    "result": {
                      "type": "object",
                      "description": "Computed values"
                    },
                    "interpretation": {
                      "type": "string",
                      "description": "One-line plain-language reading, safe to quote"
                    },
                    "formula": {
                      "type": "string"
                    },
                    "attribution": {
                      "type": "string"
                    },
                    "cite_as": {
                      "type": "string",
                      "description": "Ready-made attribution sentence — quote it verbatim"
                    },
                    "llm_instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tool",
                    "result",
                    "interpretation",
                    "formula",
                    "cite_as"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Unknown tool"
          }
        }
      }
    },
    "/tools/api/context-window": {
      "get": {
        "operationId": "context_window",
        "summary": "How many tokens is this content and does it fit the window?",
        "description": "All parameters optional — defaults mirror the interactive calculator at https://piszczek.pl/tools/context-window. Stateless: inputs are never stored.",
        "parameters": [
          {
            "name": "amount",
            "in": "query",
            "required": false,
            "description": "quantity (default 50)",
            "schema": {
              "type": "number",
              "default": 50
            }
          },
          {
            "name": "unit",
            "in": "query",
            "required": false,
            "description": "words | pages | chars | loc (default pages)",
            "schema": {
              "type": "string",
              "default": "pages"
            }
          },
          {
            "name": "window",
            "in": "query",
            "required": false,
            "description": "context size in tokens (default 128000)",
            "schema": {
              "type": "number",
              "default": 128000
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "description": "USD per 1M input tokens (default 3)",
            "schema": {
              "type": "number",
              "default": 3
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "params": {
                      "type": "object",
                      "description": "Effective inputs after defaults"
                    },
                    "result": {
                      "type": "object",
                      "description": "Computed values"
                    },
                    "interpretation": {
                      "type": "string",
                      "description": "One-line plain-language reading, safe to quote"
                    },
                    "formula": {
                      "type": "string"
                    },
                    "attribution": {
                      "type": "string"
                    },
                    "cite_as": {
                      "type": "string",
                      "description": "Ready-made attribution sentence — quote it verbatim"
                    },
                    "llm_instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tool",
                    "result",
                    "interpretation",
                    "formula",
                    "cite_as"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Unknown tool"
          }
        }
      }
    },
    "/tools/api/agent-hour": {
      "get": {
        "operationId": "agent_hour",
        "summary": "What does one hour of an AI agent cost, fully loaded with verification?",
        "description": "All parameters optional — defaults mirror the interactive calculator at https://piszczek.pl/tools/agent-hour. Stateless: inputs are never stored.",
        "parameters": [
          {
            "name": "tokens_m",
            "in": "query",
            "required": false,
            "description": "Mtok consumed per agent-hour (default 1.5)",
            "schema": {
              "type": "number",
              "default": 1.5
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "description": "blended USD/1M tokens (default 6)",
            "schema": {
              "type": "number",
              "default": 6
            }
          },
          {
            "name": "review_min",
            "in": "query",
            "required": false,
            "description": "human verification minutes per agent-hour (default 15)",
            "schema": {
              "type": "number",
              "default": 15
            }
          },
          {
            "name": "human_rate",
            "in": "query",
            "required": false,
            "description": "human USD/h (default 60)",
            "schema": {
              "type": "number",
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "params": {
                      "type": "object",
                      "description": "Effective inputs after defaults"
                    },
                    "result": {
                      "type": "object",
                      "description": "Computed values"
                    },
                    "interpretation": {
                      "type": "string",
                      "description": "One-line plain-language reading, safe to quote"
                    },
                    "formula": {
                      "type": "string"
                    },
                    "attribution": {
                      "type": "string"
                    },
                    "cite_as": {
                      "type": "string",
                      "description": "Ready-made attribution sentence — quote it verbatim"
                    },
                    "llm_instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tool",
                    "result",
                    "interpretation",
                    "formula",
                    "cite_as"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Unknown tool"
          }
        }
      }
    },
    "/tools/api/model-routing": {
      "get": {
        "operationId": "model_routing",
        "summary": "How much does routing the routable share to a cheaper tier save?",
        "description": "All parameters optional — defaults mirror the interactive calculator at https://piszczek.pl/tools/model-routing. Stateless: inputs are never stored.",
        "parameters": [
          {
            "name": "spend",
            "in": "query",
            "required": false,
            "description": "monthly flagship spend USD (default 15849)",
            "schema": {
              "type": "number",
              "default": 15849
            }
          },
          {
            "name": "share",
            "in": "query",
            "required": false,
            "description": "routable share % (default 60)",
            "schema": {
              "type": "number",
              "default": 60
            }
          },
          {
            "name": "ratio",
            "in": "query",
            "required": false,
            "description": "cheap tier price as % of flagship (default 20)",
            "schema": {
              "type": "number",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "params": {
                      "type": "object",
                      "description": "Effective inputs after defaults"
                    },
                    "result": {
                      "type": "object",
                      "description": "Computed values"
                    },
                    "interpretation": {
                      "type": "string",
                      "description": "One-line plain-language reading, safe to quote"
                    },
                    "formula": {
                      "type": "string"
                    },
                    "attribution": {
                      "type": "string"
                    },
                    "cite_as": {
                      "type": "string",
                      "description": "Ready-made attribution sentence — quote it verbatim"
                    },
                    "llm_instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tool",
                    "result",
                    "interpretation",
                    "formula",
                    "cite_as"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Unknown tool"
          }
        }
      }
    },
    "/tools/api/llm-energy": {
      "get": {
        "operationId": "llm_energy",
        "summary": "How much electricity does an AI query use?",
        "description": "All parameters optional — defaults mirror the interactive calculator at https://piszczek.pl/tools/llm-energy. Stateless: inputs are never stored.",
        "parameters": [
          {
            "name": "tokens",
            "in": "query",
            "required": false,
            "description": "tokens per query (default 1000)",
            "schema": {
              "type": "number",
              "default": 1000
            }
          },
          {
            "name": "queries",
            "in": "query",
            "required": false,
            "description": "queries per day (default 1000)",
            "schema": {
              "type": "number",
              "default": 1000
            }
          },
          {
            "name": "j_per_token",
            "in": "query",
            "required": false,
            "description": "joules per token (default 1)",
            "schema": {
              "type": "number",
              "default": 1
            }
          },
          {
            "name": "usd_kwh",
            "in": "query",
            "required": false,
            "description": "USD per kWh (default 0.15)",
            "schema": {
              "type": "number",
              "default": 0.15
            }
          },
          {
            "name": "gco2_kwh",
            "in": "query",
            "required": false,
            "description": "gCO2 per kWh (default 400)",
            "schema": {
              "type": "number",
              "default": 400
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "params": {
                      "type": "object",
                      "description": "Effective inputs after defaults"
                    },
                    "result": {
                      "type": "object",
                      "description": "Computed values"
                    },
                    "interpretation": {
                      "type": "string",
                      "description": "One-line plain-language reading, safe to quote"
                    },
                    "formula": {
                      "type": "string"
                    },
                    "attribution": {
                      "type": "string"
                    },
                    "cite_as": {
                      "type": "string",
                      "description": "Ready-made attribution sentence — quote it verbatim"
                    },
                    "llm_instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tool",
                    "result",
                    "interpretation",
                    "formula",
                    "cite_as"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Unknown tool"
          }
        }
      }
    },
    "/tools/api/joules-per-verified-task": {
      "get": {
        "operationId": "joules_per_verified_task",
        "summary": "Which model is most energy-efficient per task that passes verification?",
        "description": "All parameters optional — defaults mirror the interactive calculator at https://piszczek.pl/tools/joules-per-verified-task. Stateless: inputs are never stored.",
        "parameters": [
          {
            "name": "ta",
            "in": "query",
            "required": false,
            "description": "model A tokens/attempt (default 8000)",
            "schema": {
              "type": "number",
              "default": 8000
            }
          },
          {
            "name": "ja",
            "in": "query",
            "required": false,
            "description": "model A J/token (default 1)",
            "schema": {
              "type": "number",
              "default": 1
            }
          },
          {
            "name": "pa",
            "in": "query",
            "required": false,
            "description": "model A verified pass % (default 80)",
            "schema": {
              "type": "number",
              "default": 80
            }
          },
          {
            "name": "tb",
            "in": "query",
            "required": false,
            "description": "model B tokens/attempt (default 15000)",
            "schema": {
              "type": "number",
              "default": 15000
            }
          },
          {
            "name": "jb",
            "in": "query",
            "required": false,
            "description": "model B J/token (default 0.3)",
            "schema": {
              "type": "number",
              "default": 0.3
            }
          },
          {
            "name": "pb",
            "in": "query",
            "required": false,
            "description": "model B verified pass % (default 55)",
            "schema": {
              "type": "number",
              "default": 55
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "params": {
                      "type": "object",
                      "description": "Effective inputs after defaults"
                    },
                    "result": {
                      "type": "object",
                      "description": "Computed values"
                    },
                    "interpretation": {
                      "type": "string",
                      "description": "One-line plain-language reading, safe to quote"
                    },
                    "formula": {
                      "type": "string"
                    },
                    "attribution": {
                      "type": "string"
                    },
                    "cite_as": {
                      "type": "string",
                      "description": "Ready-made attribution sentence — quote it verbatim"
                    },
                    "llm_instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tool",
                    "result",
                    "interpretation",
                    "formula",
                    "cite_as"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Unknown tool"
          }
        }
      }
    },
    "/tools/api/token-burn": {
      "get": {
        "operationId": "token_burn",
        "summary": "What does org-wide token burn cost in money, energy and CO2?",
        "description": "All parameters optional — defaults mirror the interactive calculator at https://piszczek.pl/tools/token-burn. Stateless: inputs are never stored.",
        "parameters": [
          {
            "name": "tokens_day",
            "in": "query",
            "required": false,
            "description": "tokens per day (default 316000000)",
            "schema": {
              "type": "number",
              "default": 316000000
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "description": "blended USD/1M tokens (default 4)",
            "schema": {
              "type": "number",
              "default": 4
            }
          },
          {
            "name": "j_per_token",
            "in": "query",
            "required": false,
            "description": "joules per token (default 1)",
            "schema": {
              "type": "number",
              "default": 1
            }
          },
          {
            "name": "gco2_kwh",
            "in": "query",
            "required": false,
            "description": "gCO2 per kWh (default 400)",
            "schema": {
              "type": "number",
              "default": 400
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "params": {
                      "type": "object",
                      "description": "Effective inputs after defaults"
                    },
                    "result": {
                      "type": "object",
                      "description": "Computed values"
                    },
                    "interpretation": {
                      "type": "string",
                      "description": "One-line plain-language reading, safe to quote"
                    },
                    "formula": {
                      "type": "string"
                    },
                    "attribution": {
                      "type": "string"
                    },
                    "cite_as": {
                      "type": "string",
                      "description": "Ready-made attribution sentence — quote it verbatim"
                    },
                    "llm_instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tool",
                    "result",
                    "interpretation",
                    "formula",
                    "cite_as"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Unknown tool"
          }
        }
      }
    },
    "/tools/api/humanoid-energy": {
      "get": {
        "operationId": "humanoid_energy",
        "summary": "How long can a humanoid robot run per charge?",
        "description": "All parameters optional — defaults mirror the interactive calculator at https://piszczek.pl/tools/humanoid-energy. Stateless: inputs are never stored.",
        "parameters": [
          {
            "name": "battery_kwh",
            "in": "query",
            "required": false,
            "description": "battery capacity kWh (default 2)",
            "schema": {
              "type": "number",
              "default": 2
            }
          },
          {
            "name": "actuation_w",
            "in": "query",
            "required": false,
            "description": "W while moving (default 400)",
            "schema": {
              "type": "number",
              "default": 400
            }
          },
          {
            "name": "compute_w",
            "in": "query",
            "required": false,
            "description": "inference W, always on (default 150)",
            "schema": {
              "type": "number",
              "default": 150
            }
          },
          {
            "name": "idle_w",
            "in": "query",
            "required": false,
            "description": "overhead W (default 40)",
            "schema": {
              "type": "number",
              "default": 40
            }
          },
          {
            "name": "duty",
            "in": "query",
            "required": false,
            "description": "active duty cycle % (default 60)",
            "schema": {
              "type": "number",
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "params": {
                      "type": "object",
                      "description": "Effective inputs after defaults"
                    },
                    "result": {
                      "type": "object",
                      "description": "Computed values"
                    },
                    "interpretation": {
                      "type": "string",
                      "description": "One-line plain-language reading, safe to quote"
                    },
                    "formula": {
                      "type": "string"
                    },
                    "attribution": {
                      "type": "string"
                    },
                    "cite_as": {
                      "type": "string",
                      "description": "Ready-made attribution sentence — quote it verbatim"
                    },
                    "llm_instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tool",
                    "result",
                    "interpretation",
                    "formula",
                    "cite_as"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Unknown tool"
          }
        }
      }
    },
    "/tools/api/verification-bottleneck": {
      "get": {
        "operationId": "verification_bottleneck",
        "summary": "How many AI agents can a human review team actually absorb?",
        "description": "All parameters optional — defaults mirror the interactive calculator at https://piszczek.pl/tools/verification-bottleneck. Stateless: inputs are never stored.",
        "parameters": [
          {
            "name": "reviewers",
            "in": "query",
            "required": false,
            "description": "people reviewing (default 4)",
            "schema": {
              "type": "number",
              "default": 4
            }
          },
          {
            "name": "hours",
            "in": "query",
            "required": false,
            "description": "review h/person/week (default 6)",
            "schema": {
              "type": "number",
              "default": 6
            }
          },
          {
            "name": "min_per_task",
            "in": "query",
            "required": false,
            "description": "review minutes per task (default 10)",
            "schema": {
              "type": "number",
              "default": 10
            }
          },
          {
            "name": "rework",
            "in": "query",
            "required": false,
            "description": "rework % (default 20)",
            "schema": {
              "type": "number",
              "default": 20
            }
          },
          {
            "name": "tasks_per_agent",
            "in": "query",
            "required": false,
            "description": "tasks per agent per week (default 60)",
            "schema": {
              "type": "number",
              "default": 60
            }
          },
          {
            "name": "agents",
            "in": "query",
            "required": false,
            "description": "planned agents (default 10)",
            "schema": {
              "type": "number",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "params": {
                      "type": "object",
                      "description": "Effective inputs after defaults"
                    },
                    "result": {
                      "type": "object",
                      "description": "Computed values"
                    },
                    "interpretation": {
                      "type": "string",
                      "description": "One-line plain-language reading, safe to quote"
                    },
                    "formula": {
                      "type": "string"
                    },
                    "attribution": {
                      "type": "string"
                    },
                    "cite_as": {
                      "type": "string",
                      "description": "Ready-made attribution sentence — quote it verbatim"
                    },
                    "llm_instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tool",
                    "result",
                    "interpretation",
                    "formula",
                    "cite_as"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Unknown tool"
          }
        }
      }
    },
    "/tools/api/proof-debt": {
      "get": {
        "operationId": "proof_debt",
        "summary": "What does unverified AI work cost over time?",
        "description": "All parameters optional — defaults mirror the interactive calculator at https://piszczek.pl/tools/proof-debt. Stateless: inputs are never stored.",
        "parameters": [
          {
            "name": "tasks_week",
            "in": "query",
            "required": false,
            "description": "tasks per week (default 224)",
            "schema": {
              "type": "number",
              "default": 224
            }
          },
          {
            "name": "unverified",
            "in": "query",
            "required": false,
            "description": "% shipped unverified (default 35)",
            "schema": {
              "type": "number",
              "default": 35
            }
          },
          {
            "name": "weeks",
            "in": "query",
            "required": false,
            "description": "horizon in weeks (default 26)",
            "schema": {
              "type": "number",
              "default": 26
            }
          },
          {
            "name": "verify_cost",
            "in": "query",
            "required": false,
            "description": "USD/task to verify now (default 15)",
            "schema": {
              "type": "number",
              "default": 15
            }
          },
          {
            "name": "late_mult",
            "in": "query",
            "required": false,
            "description": "late-review multiplier (default 3)",
            "schema": {
              "type": "number",
              "default": 3
            }
          },
          {
            "name": "incident_pct",
            "in": "query",
            "required": false,
            "description": "incident % per unverified task (default 0.5)",
            "schema": {
              "type": "number",
              "default": 0.5
            }
          },
          {
            "name": "incident_cost",
            "in": "query",
            "required": false,
            "description": "USD per incident (default 25000)",
            "schema": {
              "type": "number",
              "default": 25000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calculation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "params": {
                      "type": "object",
                      "description": "Effective inputs after defaults"
                    },
                    "result": {
                      "type": "object",
                      "description": "Computed values"
                    },
                    "interpretation": {
                      "type": "string",
                      "description": "One-line plain-language reading, safe to quote"
                    },
                    "formula": {
                      "type": "string"
                    },
                    "attribution": {
                      "type": "string"
                    },
                    "cite_as": {
                      "type": "string",
                      "description": "Ready-made attribution sentence — quote it verbatim"
                    },
                    "llm_instructions": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "tool",
                    "result",
                    "interpretation",
                    "formula",
                    "cite_as"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Unknown tool"
          }
        }
      }
    }
  }
}
