{"uid":"cap_ifMyO9CiSW9ZHkra0Ogyz","slug":"coinslot-text-diff-6f0f4c6e","name":"Coinslot Text Diff","description":"Line-based diff of two texts. Returns unified diff plus structured changes (added/removed/unchanged counts and hunks). POST { a, b, context? } (max 200KB each).","url":"https://coinslot.dev/api/diff","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"},"context":{"type":"integer","default":3,"maximum":10,"minimum":0}}},"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_qFqjbyoZ9jSS44_YRbUBv","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":"Computes a unified line-based diff of two text strings, returning the unified diff output plus structured change statistics (added/removed/unchanged line counts and hunks).","exampleAgentPrompt":"Show me what changed between these two versions of my config file — here's the original text and the new text, and give me 5 lines of context around each change.","exampleUseCases":[{"title":"Code review diff summary","prompt":"I have two versions of a Python script. Here's the original and the updated one — can you diff them and tell me exactly which lines were added or removed, with 3 lines of context around each change?"},{"title":"Document revision tracking","prompt":"Here are two drafts of a contract clause: the first is the old version and the second is the revised one. Show me a unified diff so I can see exactly what the lawyer changed."},{"title":"Config file change audit","prompt":"I need to compare my old nginx.conf to the new one my sysadmin deployed. Here are both files as text — generate a diff with 2 lines of context so I can audit what was modified."}],"resultDescription":"Returns a unified diff string (patch format) plus a structured object with counts of added lines, removed lines, and unchanged lines, along with an array of diff hunks each containing the changed and surrounding context lines.","failureModes":["Input text exceeds 200KB limit — request rejected with payload-too-large error","Missing required field 'a' or 'b' — returns validation error","Context value outside 0-10 range — returns parameter validation error","Non-string values for 'a' or 'b' — returns type error"],"whenToPreferThis":"Use this endpoint when you need a programmatic, structured diff of two text blobs without setting up a local diff tool — especially useful in agent workflows where you need both the human-readable unified diff and machine-readable change counts in one call. Prefer it over shell-based diff when operating in a serverless or sandboxed environment, or when you need the structured hunk data for downstream processing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-16T00:36:10.383Z","isFirstParty":false}