{
  "openapi": "3.1.0",
  "info": {
    "title": "Billcut API",
    "version": "1.0.0",
    "description": "Billcut audits an uploaded bank/card statement (PDF or CSV): recurring charges ranked by annual cost, with cancel and negotiation scripts. No bank login. Uploaded files are deleted immediately after parsing; account numbers are masked at parse time."
  },
  "servers": [
    {
      "url": "https://billcut.mehyar.us"
    }
  ],
  "paths": {
    "/api/v1/teaser": {
      "post": {
        "summary": "Upload a statement (multipart: file, consent=yes) and get the free teaser or, for monitoring tokens, a full audit",
        "responses": {
          "200": {
            "description": "Teaser totals or full audit"
          },
          "400": {
            "description": "Validation error"
          },
          "422": {
            "description": "No readable charges"
          },
          "429": {
            "description": "Daily free-audit limit"
          }
        }
      }
    },
    "/api/v1/audit/{token}": {
      "get": {
        "summary": "Fetch an audit by its private token (full report only when paid)",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Audit"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/v1/delete": {
      "post": {
        "summary": "Delete an audit by token",
        "responses": {
          "200": {
            "description": "Deleted"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "summary": "MCP JSON-RPC endpoint (tools: billcut_product_info, billcut_audit_summary, billcut_analyze_csv, billcut_delete_audit)",
        "responses": {
          "200": {
            "description": "JSON-RPC response"
          }
        }
      }
    }
  }
}