{"uid":"cap_tehRRZOfyaY8JuXfYl5J8","slug":"agent-payload-tools-text-diff-31023545","name":"Agent Payload Tools – Text Diff","description":"Return a deterministic line-by-line difference summary for two texts.","url":"https://api.agent-payload-tools.workers.dev/text-diff","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"after":{"type":"string","default":"","description":"Updated text."},"before":{"type":"string","default":"","description":"Original text."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_zbqHyDmo8F3ScntDugRYv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes a deterministic line-by-line text diff between two strings, returning the differences between the original and updated text.","exampleAgentPrompt":"Show me exactly what changed between these two versions of my README file — the original says 'Installation requires Node 16' and the updated version says 'Installation requires Node 20 or higher, with npm 9+'.","exampleUseCases":[{"title":"Config file change review","prompt":"I updated my nginx config and want to know exactly what lines changed — before it had 'worker_processes 2; keepalive_timeout 65;' and now it has 'worker_processes 4; keepalive_timeout 30; gzip on;'. Can you show me the diff?"},{"title":"Draft document revision tracking","prompt":"I revised a paragraph in my report — the original was 'Sales grew 10% in Q3 due to new product launches.' and the new version is 'Sales grew 14% in Q3 and Q4 combined, driven by new product launches and expanded distribution.' What exactly changed?"},{"title":"Automated changelog generation","prompt":"Compare these two versions of my API description and tell me what was added or removed: old version is 'Returns user profile data including name and email.' and new version is 'Returns user profile data including name, email, phone, and avatar URL.'"}],"resultDescription":"The endpoint returns a structured diff showing which lines or segments were added, removed, or unchanged between the 'before' and 'after' text inputs, enabling precise change detection between two versions of any text.","failureModes":["Missing 'before' or 'after' fields returns a validation error","Extremely large text inputs may time out or exceed payload limits","Payment failure (x402) prevents processing","Non-string values in before/after fields may cause errors"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, programmatic text diff within an AI agent workflow — especially when comparing configuration files, document revisions, code snippets, or any string content where exact line-by-line change detection is required. Prefer it over manual string comparison or LLM-based summarization when you need precise, structured diff output rather than a prose description of changes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:30:31.795Z","isFirstParty":false}