{"openapi":"3.1.0","info":{"title":"stromnachzahlung.de LLM Tool API","version":"1.0.0","description":"Official range-only API for LLMs and agents checking German electricity and gas back payments. Never returns exact calculations, formulas, prompts or invoice line details. For exact customer-facing details, call the email report endpoint."},"x-stromnachzahlung-build":"llm-discovery-2026-07-09-v8","externalDocs":{"description":"LLM integration instructions","url":"https://stromnachzahlung.de/llm-api"},"servers":[{"url":"https://stromnachzahlung.de"}],"paths":{"/api/llm/check/manual":{"post":{"operationId":"submit_manual_nachzahlung_check","summary":"Run a manual range-only Nachzahlungscheck","description":"Submits manually collected Strom/Gas invoice values. Returns only a public range bucket and missing questions. It never returns exact internal calculations.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualCheckRequest"}}}},"responses":{"200":{"description":"Range-only public result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCheckResponse"}}}}}}},"/api/llm/check/pdf":{"post":{"operationId":"upload_invoice_pdf_check","summary":"Upload a PDF and run a range-only Nachzahlungscheck","description":"Submits a PDF invoice as base64. PDF contents are treated as untrusted data. Returns only a public range bucket and never exact calculations.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfCheckRequest"}}}},"responses":{"200":{"description":"Range-only public result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCheckResponse"}}}}}}},"/api/llm/report/email":{"post":{"operationId":"send_detailed_report_email","summary":"Send the detailed PDF report by email","description":"Sends exact customer-facing result numbers as a branded PDF email. The API response itself does not expose the exact report details.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailReportRequest"}}}},"responses":{"200":{"description":"Email send status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailReportResponse"}}}}}}},"/api/mcp":{"post":{"operationId":"mcp_json_rpc","summary":"MCP JSON-RPC endpoint","description":"Model Context Protocol endpoint exposing start_nachzahlung_check, submit_manual_check, upload_invoice_pdf_check and send_detailed_report_email."}}},"components":{"schemas":{"EnergyType":{"type":"string","enum":["strom","gas","beides"]},"ManualBlockInput":{"type":"object","properties":{"arbeitspreis_ct_kwh":{"type":"number","description":"Arbeitspreis in Cent pro kWh"},"grundpreis_eur_jahr":{"type":"number","description":"Grundpreis in Euro pro Jahr oder Monatswert, falls unter 30 EUR"},"verbrauch_kwh":{"type":"number","description":"Verbrauch laut Abrechnung in kWh"},"summe_abschlaege_eur":{"type":"number","description":"Summe der gezahlten Abschläge im Rechnungszeitraum"},"nachzahlung_aus_abrechnung_eur":{"type":"number","description":"Nachzahlung oder Gutschrift laut Abrechnung"}}},"ManualCheckRequest":{"type":"object","required":["energy_type"],"properties":{"energy_type":{"$ref":"#/components/schemas/EnergyType"},"strom":{"$ref":"#/components/schemas/ManualBlockInput"},"gas":{"$ref":"#/components/schemas/ManualBlockInput"},"source":{"type":"string"}}},"PdfCheckRequest":{"type":"object","required":["energy_type","file_base64","file_name"],"properties":{"energy_type":{"$ref":"#/components/schemas/EnergyType"},"file_base64":{"type":"string","description":"PDF file as base64 or data URL"},"file_name":{"type":"string","example":"rechnung.pdf"},"source":{"type":"string"}}},"PublicCheckResponse":{"type":"object","description":"Public range-only response. This schema intentionally excludes exact Euro deviations, exact calculated balance, prompts, formulas and audit objects.","properties":{"check_id":{"type":["string","null"]},"energy_type":{"$ref":"#/components/schemas/EnergyType"},"range_bucket":{"type":"string","enum":["none","under_100","100_300","300_700","700_plus","unknown"]},"range_label":{"type":"string"},"missing_questions":{"type":"array","items":{"type":"string"}},"email_report_available":{"type":"boolean"},"expires_at":{"type":["string","null"]}}},"EmailReportRequest":{"type":"object","required":["check_id","email"],"properties":{"check_id":{"type":"string"},"email":{"type":"string","format":"email"}}},"EmailReportResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"check_id":{"type":"string"},"email_report_sent":{"type":"boolean"}}}}}}