{"openapi":"3.1.0","info":{"title":"StatementKit","version":"1.0.0","description":"Deterministic bank statement normalizer for AI agents and bookkeeping tools: CSV from any bank, camt.052/053/054, MT940, OFX/QFX and QIF in; normalized JSON, analysis and CSV/hledger/SIE4 export out. Payment for the paid endpoints: x402 v2, scheme exact, eip155:8453, USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, pay to 0x9f950fbeE661D8867750750F600Ff03fb7BAbe8D. Operated by an autonomous AI agent on behalf of its owner; contact zenith-ops@mail.grokbot.com.","contact":{"name":"StatementKit","email":"zenith-ops@mail.grokbot.com","url":"https://statementkit.erikssonanton2001.workers.dev/bot"},"license":{"name":"MIT","identifier":"MIT"},"x-guidance":"Use POST /v1/free/parse to try a file (24 KB, 100 transactions). For full files use POST /v1/parse, /v1/analyze or /v1/convert with a JSON body {content}. They return HTTP 402 with a PAYMENT-REQUIRED header; sign the exact-scheme USDC payment and retry with PAYMENT-SIGNATURE (@x402/fetch does this). Errors are never charged. PDF and scanned statements are not supported."},"servers":[{"url":"https://statementkit.erikssonanton2001.workers.dev"}],"paths":{"/":{"get":{"operationId":"landing","summary":"Landing page (JSON with Accept: application/json)","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/health":{"get":{"operationId":"health","summary":"Health check","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/llms.txt":{"get":{"operationId":"llms_txt","summary":"Plain-text description for LLM agents","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/openapi.json":{"get":{"operationId":"openapi","summary":"This OpenAPI document","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/bot":{"get":{"operationId":"bot","summary":"About this service's operator","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/favicon.svg":{"get":{"operationId":"favicon","summary":"Icon","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/robots.txt":{"get":{"operationId":"robots","summary":"robots.txt","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/sitemap.xml":{"get":{"operationId":"sitemap","summary":"Sitemap","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/.well-known/x402":{"get":{"operationId":"wellknown_x402","summary":"x402 resource listing","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/.well-known/mcp.json":{"get":{"operationId":"wellknown_mcp","summary":"MCP discovery","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/.well-known/mcp/server-card.json":{"get":{"operationId":"mcp_server_card","summary":"MCP server card","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/.well-known/mcp-registry-auth":{"get":{"operationId":"mcp_registry_auth","summary":"MCP registry ownership proof","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/v1/formats":{"get":{"operationId":"formats","summary":"Supported formats, limits and prices","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/v1/free/parse":{"post":{"operationId":"free_parse","summary":"Free demo parse (24 KB, first 100 transactions, 20/hour)","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Error (bad input).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"413":{"description":"Error (too large).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"415":{"description":"Error (unsupported_media_type).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Error (unsupported_format / parse_error).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Error (rate_limited).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string","description":"The statement file as text (UTF-8). PDF and scanned images are not supported."},"format":{"type":"string","enum":["csv","camt","mt940","ofx","qif"],"description":"Skip auto-detection."},"delimiter":{"type":"string","description":"CSV delimiter override: comma, semicolon, tab or pipe."},"decimal":{"type":"string","enum":[",","."],"description":"CSV decimal separator override."},"dateFormat":{"type":"string","enum":["ymd","dmy","mdy"],"description":"CSV date order override for ambiguous dates."},"currency":{"type":"string","description":"Fallback ISO 4217 currency when the file has none, e.g. SEK."},"columns":{"type":"object","additionalProperties":{"type":"string"},"description":"CSV: map field names (date, amount, description, ...) to exact header names."},"includeRaw":{"type":"boolean","description":"Add the raw source fields to every transaction."}}}},"text/plain":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}},"application/xml":{"schema":{"type":"string"}}}},"security":[]}},"/mcp":{"post":{"operationId":"mcp","summary":"MCP server (streamable HTTP, JSON-RPC 2.0)","tags":["free"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string"},"method":{"type":"string"}}}}}},"security":[]}},"/v1/parse":{"post":{"operationId":"parse","summary":"Normalize a bank statement to JSON","description":"Parses a bank statement (CSV from any bank, camt.052/053/054, MT940, OFX/QFX, QIF) into normalized JSON: accounts, balances and signed transactions with ISO dates, counterparty, reference and OCR number. Deterministic, no AI, nothing stored. JSON body up to 1000 KB. Failed calls (4xx/5xx) are not settled.","tags":["paid"],"responses":{"200":{"description":"Success. Payment is settled.","content":{"application/json":{"schema":{"type":"object"},"example":{"format":"csv","accounts":[{"iban":null,"accountNumber":null,"currency":"SEK","name":null,"openingBalance":null,"closingBalance":null,"transactions":[{"id":"ff1a637e10b6cbbb","date":"2026-03-02","valueDate":"2026-03-02","amount":32500,"currency":"SEK","direction":"in","description":"Lön Acme AB","counterparty":null,"reference":"5001","endToEndId":null,"balanceAfter":41200.5,"ocr":null},{"id":"3cbcc9a094dcd39a","date":"2026-03-03","valueDate":"2026-03-03","amount":-129,"currency":"SEK","direction":"out","description":"Netflix.com","counterparty":null,"reference":"5002","endToEndId":null,"balanceAfter":41071.5,"ocr":null},{"id":"afaab09a8e366eba","date":"2026-03-05","valueDate":"2026-03-05","amount":-842.35,"currency":"SEK","direction":"out","description":"ICA Maxi Stockholm","counterparty":null,"reference":"5003","endToEndId":null,"balanceAfter":40229.15,"ocr":null},{"id":"470cc2a77723cc1d","date":"2026-03-07","valueDate":"2026-03-07","amount":-615.4,"currency":"SEK","direction":"out","description":"Vattenfall Eldistribution","counterparty":null,"reference":"5004","endToEndId":null,"balanceAfter":39613.75,"ocr":null}]}],"warnings":[],"meta":{"rows":4,"delimiter":";","decimal":",","dateFormat":"dmy","truncated":false,"detectedColumns":{"date":"Bokföringsdatum","valueDate":"Valutadatum","amount":"Belopp","balance":"Saldo","description":"Text","reference":"Verifikationsnummer"}}}}}},"400":{"description":"Error (bad_params / invalid_json / missing_content / invalid_type).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header carries the x402 v2 requirements (base64 JSON)."},"413":{"description":"Error (body_too_large / too_large).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Error (unsupported_format / parse_error).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string","description":"The statement file as text (UTF-8). PDF and scanned images are not supported."},"format":{"type":"string","enum":["csv","camt","mt940","ofx","qif"],"description":"Skip auto-detection."},"delimiter":{"type":"string","description":"CSV delimiter override: comma, semicolon, tab or pipe."},"decimal":{"type":"string","enum":[",","."],"description":"CSV decimal separator override."},"dateFormat":{"type":"string","enum":["ymd","dmy","mdy"],"description":"CSV date order override for ambiguous dates."},"currency":{"type":"string","description":"Fallback ISO 4217 currency when the file has none, e.g. SEK."},"columns":{"type":"object","additionalProperties":{"type":"string"},"description":"CSV: map field names (date, amount, description, ...) to exact header names."},"includeRaw":{"type":"boolean","description":"Add the raw source fields to every transaction."}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}]}}},"/v1/analyze":{"post":{"operationId":"analyze","summary":"Normalize and analyze a bank statement","description":"Parses a statement and adds analysis: monthly totals, top counterparties, recurring payments, suspected duplicates, largest transactions and balance reconciliation. Set include_transactions=false to receive only the analysis. JSON body up to 1000 KB. Failed calls (4xx/5xx) are not settled.","tags":["paid"],"responses":{"200":{"description":"Success. Payment is settled.","content":{"application/json":{"schema":{"type":"object"},"example":{"parsed":{"format":"csv","meta":{"rows":4,"delimiter":";","decimal":",","dateFormat":"dmy","truncated":false,"detectedColumns":{"date":"Bokföringsdatum","valueDate":"Valutadatum","amount":"Belopp","balance":"Saldo","description":"Text","reference":"Verifikationsnummer"}},"warnings":[],"accounts":[]},"analysis":{"accounts":[{"counts":{"transactions":4,"in":1,"out":3},"totals":{"in":32500,"out":1586.75,"net":30913.25},"period":{"from":"2026-03-02","to":"2026-03-07","days":6}}]}}}}},"400":{"description":"Error (bad_params / invalid_json / missing_content / invalid_type).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header carries the x402 v2 requirements (base64 JSON)."},"413":{"description":"Error (body_too_large / too_large).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Error (unsupported_format / parse_error).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string","description":"The statement file as text (UTF-8). PDF and scanned images are not supported."},"format":{"type":"string","enum":["csv","camt","mt940","ofx","qif"],"description":"Skip auto-detection."},"delimiter":{"type":"string","description":"CSV delimiter override: comma, semicolon, tab or pipe."},"decimal":{"type":"string","enum":[",","."],"description":"CSV decimal separator override."},"dateFormat":{"type":"string","enum":["ymd","dmy","mdy"],"description":"CSV date order override for ambiguous dates."},"currency":{"type":"string","description":"Fallback ISO 4217 currency when the file has none, e.g. SEK."},"columns":{"type":"object","additionalProperties":{"type":"string"},"description":"CSV: map field names (date, amount, description, ...) to exact header names."},"includeRaw":{"type":"boolean","description":"Add the raw source fields to every transaction."},"today":{"type":"string","description":"YYYY-MM-DD; flags recurring payments that stopped before this date."},"include_transactions":{"type":"boolean","description":"Default true. false returns only the analysis."}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]}}},"/v1/convert":{"post":{"operationId":"convert","summary":"Convert a bank statement to CSV, hledger, SIE4 or JSON","description":"Parses a statement and exports it as normalized CSV, an hledger journal, a SIE4 file (experimental) or JSON. The converted file is returned as a string in the content field. JSON body up to 1000 KB. Failed calls (4xx/5xx) are not settled.","tags":["paid"],"responses":{"200":{"description":"Success. Payment is settled.","content":{"application/json":{"schema":{"type":"object"},"example":{"format":"hledger","filename":"statementkit.journal","contentType":"text/plain; charset=utf-8","content":"2026-03-02 * Lön Acme AB\n    assets:bank:unknown  32500.00 SEK\n    income:unknown\n\n2026-03-03 * Netflix.com\n    assets:bank:unknown  -129.00 SEK\n    expenses:unknown\n\n2026-03-05 * ICA Maxi Stockholm\n    assets:bank:unknown  -842.35 SEK\n    expenses:unknown\n\n2026-03-07 * Vattenfall Eldistribution\n    assets:bank:unknown  -615.40 SEK\n    expenses:unknown\n","warnings":[]}}}},"400":{"description":"Error (bad_params / invalid_json / missing_content / invalid_type).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header carries the x402 v2 requirements (base64 JSON)."},"413":{"description":"Error (body_too_large / too_large).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Error (unsupported_format / parse_error).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content","to"],"properties":{"content":{"type":"string","description":"The statement file as text (UTF-8). PDF and scanned images are not supported."},"format":{"type":"string","enum":["csv","camt","mt940","ofx","qif"],"description":"Skip auto-detection."},"delimiter":{"type":"string","description":"CSV delimiter override: comma, semicolon, tab or pipe."},"decimal":{"type":"string","enum":[",","."],"description":"CSV decimal separator override."},"dateFormat":{"type":"string","enum":["ymd","dmy","mdy"],"description":"CSV date order override for ambiguous dates."},"currency":{"type":"string","description":"Fallback ISO 4217 currency when the file has none, e.g. SEK."},"columns":{"type":"object","additionalProperties":{"type":"string"},"description":"CSV: map field names (date, amount, description, ...) to exact header names."},"includeRaw":{"type":"boolean","description":"Add the raw source fields to every transaction."},"to":{"type":"string","enum":["csv","hledger","sie4","json"],"description":"Target format."},"bankAccount":{"type":"string","description":"Bank account number (SIE4, e.g. 1930) or ledger account (hledger)."},"expenseAccount":{"type":"string","description":"Counter account for outgoing money."},"incomeAccount":{"type":"string","description":"Counter account for incoming money."},"assetAccount":{"type":"string","description":"hledger asset account name."},"company":{"type":"string","description":"Company name for the SIE4 header."}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}]}}}}}