{"openapi":"3.1.0","info":{"title":"DiffMint by Harlo","version":"0.1.0","description":"DiffMint compares two texts by line, word or character and returns structured ops, a unified diff, an escaped HTML redline, change stats and a similarity score. It also applies unified diff patches. Deterministic diff (Myers algorithm via jsdiff), not an AI or semantic comparison. Limits per side: lines mode 64 KB and 1,000 lines, words mode 8 KB, chars mode 4 KB. If the texts need more than 250 inserted plus deleted units, the API returns 422 too_different instead of a partial diff. Patches up to 64 KB apply to text up to 64 KB. No 3-way merge, no binary files. Stateless: text is not stored or logged; no URL fetching. Plans: Free $0/mo · 1,000 calls/mo; BASIC $5/mo · 25,000 calls/mo; PRO $15/mo · 250,000 calls/mo.","contact":{"name":"Harlo","email":"digitalpromohub.support@gmail.com"}},"servers":[{"url":"https://diffmint.mike-tusa.workers.dev"}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key"},"bearer":{"type":"http","scheme":"bearer"}}},"security":[{},{"apiKey":[]},{"bearer":[]}],"paths":{"/v1/diff":{"post":{"operationId":"diff","summary":"Compare text a with text b by lines (default), words or chars","description":"Compare text a with text b by lines (default), words or chars. Returns ops (equal/insert/delete), a unified diff (lines mode), optional escaped HTML redline, stats and similarity. Deterministic diff (Myers algorithm via jsdiff), not an AI or semantic comparison. Limits per side: lines mode 64 KB and 1,000 lines, words mode 8 KB, chars mode 4 KB. If the texts need more than 250 inserted plus deleted units, the API returns 422 too_different instead of a partial diff. Patches up to 64 KB apply to text up to 64 KB. No 3-way merge, no binary files. Stateless: text is not stored or logged; no URL fetching.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"a":{"type":"string","description":"Original text."},"b":{"type":"string","description":"Changed text."},"mode":{"type":"string","enum":["lines","words","chars"]},"ignore_case":{"type":"boolean"},"ignore_whitespace":{"type":"boolean","description":"lines mode only"},"context":{"type":"integer","minimum":0,"maximum":20},"formats":{"type":"array","items":{"type":"string","enum":["ops","unified","html"]}},"label_a":{"type":"string"},"label_b":{"type":"string"}},"required":["a","b"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input"},"401":{"description":"Invalid API key"},"413":{"description":"Body too large"},"422":{"description":"too_different: more than the max edit length"},"429":{"description":"Rate limited"}}}},"/v1/patch":{"post":{"operationId":"patch","summary":"Apply a single-file unified diff (patch) to text and return the patched text, or applied:false if a hunk does not match","description":"Apply a single-file unified diff (patch) to text and return the patched text, or applied:false if a hunk does not match. Optional fuzz 0-2.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"patch":{"type":"string","description":"Unified diff with @@ hunks."},"fuzz":{"type":"integer","minimum":0,"maximum":2}},"required":["text","patch"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input"},"401":{"description":"Invalid API key"},"413":{"description":"Body too large"},"429":{"description":"Rate limited"}}}},"/v1/similarity":{"post":{"operationId":"similarity","summary":"Similarity ratio 0-1 between two texts (2 x unchanged chars / total chars) on chars (default), words or lines granularit","description":"Similarity ratio 0-1 between two texts (2 x unchanged chars / total chars) on chars (default), words or lines granularity, plus change stats.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"a":{"type":"string","description":"Original text."},"b":{"type":"string","description":"Changed text."},"mode":{"type":"string","enum":["lines","words","chars"]},"ignore_case":{"type":"boolean"}},"required":["a","b"]}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Invalid input"},"401":{"description":"Invalid API key"},"413":{"description":"Body too large"},"422":{"description":"too_different: more than the max edit length"},"429":{"description":"Rate limited"}}}},"/v1/info":{"get":{"operationId":"info","summary":"Modes, formats, size caps and limits.","description":"Modes, formats, size caps and limits.","responses":{"200":{"description":"OK"},"400":{"description":"Invalid input"},"401":{"description":"Invalid API key"},"413":{"description":"Body too large"},"429":{"description":"Rate limited"}}}}}}