{"openapi":"3.1.0","info":{"title":"Toolfik Public API","version":"1.0.0","description":"Free, keyless utility API. 100 requests/day per IP. Use responsibly and credit toolfik.com.","contact":{"name":"Toolfik","url":"https://toolfik.com"},"license":{"name":"Free with attribution","url":"https://toolfik.com"}},"servers":[{"url":"https://toolfik.com/api/v1","description":"Production"}],"paths":{"/hash":{"post":{"summary":"Hash arbitrary text","operationId":"hash","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"algorithm":{"type":"string","enum":["sha-1","sha-256","sha-384","sha-512"],"default":"sha-256"}}}}}},"responses":{"200":{"description":"Hash result","content":{"application/json":{"schema":{"type":"object","properties":{"algorithm":{"type":"string"},"hash":{"type":"string"}}}}}}}}},"/base64":{"post":{"summary":"Encode or decode base64 (UTF-8)","operationId":"base64","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"mode":{"type":"string","enum":["encode","decode"],"default":"encode"}}}}}},"responses":{"200":{"description":"Result"}}}},"/url-encode":{"post":{"summary":"URL percent-encode or decode","operationId":"urlEncode","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"mode":{"type":"string","enum":["encode","decode"],"default":"encode"}}}}}},"responses":{"200":{"description":"Result"}}}},"/slug":{"post":{"summary":"Convert text to a URL-safe slug","operationId":"slug","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"separator":{"type":"string","default":"-"}}}}}},"responses":{"200":{"description":"Slug"}}}},"/uuid":{"get":{"summary":"Generate one or more v4 UUIDs","operationId":"uuid","parameters":[{"name":"n","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":1}}],"responses":{"200":{"description":"UUID list"}}}},"/word-count":{"post":{"summary":"Count words, characters, sentences","operationId":"wordCount","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}}}}},"responses":{"200":{"description":"Counts"}}}},"/case-convert":{"post":{"summary":"Convert text case (upper/lower/title/camel/pascal/snake/kebab/constant/sentence/invert)","operationId":"caseConvert","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"properties":{"text":{"type":"string"},"mode":{"type":"string","enum":["upper","lower","title","sentence","camel","pascal","snake","kebab","constant","invert"],"default":"lower"}}}}}},"responses":{"200":{"description":"Converted text"}}}},"/extract-transactions":{"post":{"summary":"Extract transactions from a bank statement PDF (AI-powered).","description":"Uploads a base64-encoded PDF bank statement (max ~15 MB). Returns an array of transactions with date, description, amount (negative = outflow), balance, and reference. Works with US, EU, UK, and Turkish bank layouts. Uses Claude Sonnet 4.5 for extraction.","operationId":"extractTransactions","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["pdf_base64"],"properties":{"pdf_base64":{"type":"string","description":"Base64-encoded PDF (no data-URL prefix). Max ~15 MB."}}}}}},"responses":{"200":{"description":"Extracted transactions","content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"description":{"type":"string"},"amount":{"type":"number"},"balance":{"type":["number","null"]},"reference":{"type":["string","null"]}}}},"count":{"type":"integer"}}}}}},"400":{"description":"Missing pdf_base64 or PDF too large"},"502":{"description":"Anthropic API error or non-JSON output"}}}},"/extract-receipt":{"post":{"summary":"Extract structured data from a receipt (photo or PDF).","description":"Uploads a base64-encoded image (JPEG/PNG/WebP) or PDF of a receipt (max ~10 MB). Returns merchant, date, category, tax, and grand total. Supports Turkish fişler (VKN, KDV), US/UK/EU receipts, and 30+ currencies.","operationId":"extractReceipt","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["file_base64","media_type"],"properties":{"file_base64":{"type":"string","description":"Base64-encoded receipt file (image or PDF). Max ~10 MB."},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/webp","image/gif","application/pdf"]}}}}}},"responses":{"200":{"description":"Extracted receipt","content":{"application/json":{"schema":{"type":"object","properties":{"receipt":{"type":"object","properties":{"merchant":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":["string","null"]},"tax_id":{"type":["string","null"]},"phone":{"type":["string","null"]}}},"date":{"type":"string","format":"date"},"time":{"type":["string","null"]},"currency":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number"},"unit_price":{"type":["number","null"]},"total":{"type":"number"}}}},"subtotal":{"type":["number","null"]},"tax_rate":{"type":["number","null"]},"tax_amount":{"type":["number","null"]},"tax_type":{"type":["string","null"]},"grand_total":{"type":"number"},"payment_method":{"type":["string","null"]},"receipt_number":{"type":["string","null"]},"category":{"type":"string","enum":["food","grocery","restaurant","fuel","transport","office","electronics","clothing","health","entertainment","utility","other"]},"notes":{"type":["string","null"]}}}}}}}},"400":{"description":"Missing file_base64 / media_type or file too large"},"502":{"description":"Anthropic API error or non-JSON output"}}}},"/extract-invoice":{"post":{"summary":"Extract structured invoice data from a PDF (AI-powered).","description":"Uploads a base64-encoded PDF invoice (max ~15 MB). Returns a single invoice object with vendor, customer, dates, currency, line items, tax details, and totals. Supports e-Fatura / e-Arşiv (Turkish), US/EU/UK invoices, and 30+ currencies.","operationId":"extractInvoice","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["pdf_base64"],"properties":{"pdf_base64":{"type":"string","description":"Base64-encoded PDF invoice. Max ~15 MB."}}}}}},"responses":{"200":{"description":"Extracted invoice","content":{"application/json":{"schema":{"type":"object","properties":{"invoice":{"type":"object","properties":{"invoice_number":{"type":"string"},"date":{"type":"string","format":"date"},"due_date":{"type":["string","null"],"format":"date"},"currency":{"type":"string","description":"ISO 4217 (USD, EUR, TRY, GBP, ...)"},"vendor":{"type":"object","properties":{"name":{"type":"string"},"tax_id":{"type":["string","null"]},"address":{"type":["string","null"]},"email":{"type":["string","null"]}}},"customer":{"type":"object","properties":{"name":{"type":"string"},"tax_id":{"type":["string","null"]},"address":{"type":["string","null"]}}},"line_items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"quantity":{"type":"number"},"unit_price":{"type":"number"},"tax_rate":{"type":["number","null"],"description":"Percentage, e.g. 20 for 20%"},"tax_amount":{"type":["number","null"]},"total":{"type":"number"}}}},"subtotal":{"type":"number"},"tax_total":{"type":"number"},"grand_total":{"type":"number"},"payment_terms":{"type":["string","null"]},"notes":{"type":["string","null"]}}}}}}}},"400":{"description":"Missing pdf_base64 or PDF too large"},"502":{"description":"Anthropic API error or non-JSON output"}}}}}}