{"uid":"cap_MdJbzadgpI_OE9ovRv--s","slug":"defi-intel-agent-gateway-unified-git-diff-patch-generator-654083c5","name":"DeFi Intel Agent Gateway – Unified Git Diff & Patch Generator","description":"Generate a unified git diff between two strings and an applyable patch. Deterministic LCS. Returns hunks with context lines. — $0.002 USDC/call on Base. Pay-per-call via x402 — no API key, no account. Free samples daily.","url":"https://defi-intel-agent-gateway.gg-neo15.workers.dev/v1/text/diff-patch-gen","method":"POST","headers":{},"bodySchema":null,"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nq4MAkXfYzni9yFqHgBnI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a unified git-style diff and applyable patch between two text strings using deterministic LCS, returning hunks with context lines.","exampleAgentPrompt":"Generate a unified git diff between these two strings — the original is 'Hello world\nfoo bar\nbaz' and the new version is 'Hello world\nfoo baz\nbaz qux' — and give me an applyable patch with context lines.","exampleUseCases":[{"title":"Code review diff generation","prompt":"I have two versions of a Python function — the old one and the refactored one. Can you generate a unified git diff between them with context lines so I can review exactly what changed?"},{"title":"Document change tracking","prompt":"Compare these two versions of our terms-of-service text and give me a git-style unified diff patch so I can see every added, removed, and changed line."},{"title":"Config file patch creation","prompt":"Generate an applyable unified diff patch between my old nginx.conf and the new one so I can apply it programmatically to other servers."}],"resultDescription":"Returns a unified git-style diff containing one or more hunks, each with context lines showing added, removed, and unchanged lines, plus a complete applyable patch string computed via deterministic Longest Common Subsequence (LCS).","failureModes":["Missing or empty input strings returns a 400 validation error","Extremely large strings may time out or exceed payload limits","Malformed POST body or wrong content-type returns a 4xx error","Payment not fulfilled via x402 returns a 402 Payment Required response","Identical strings return an empty diff with no hunks"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, reproducible unified diff between two arbitrary text strings without spinning up a local git process or diff library — especially in serverless, edge, or agent environments where you want pay-per-call pricing and no API key setup. Prefer it over git CLI or local diff libraries when operating in a cloud/agent context needing a simple HTTP call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:40:11.218Z","isFirstParty":false}