{"uid":"cap_t5uV9HIvcfgJD_GCd9l_X","slug":"centralcity-ai-text-diff-1d7c91b3","name":"centralcity.ai Text Diff","description":"Compares two texts line by line: a unified diff and how many lines were added, removed and kept.","url":"https://centralcity.ai/api/public/x402/off_pcoojvpfj7ebutav?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"string","description":"The first (old) text, at most 64 KiB."},"b":{"type":"string","description":"The second (new) text, at most 64 KiB."},"context":{"type":"integer","maximum":10,"minimum":0,"description":"Unchanged lines shown around each change, 0 to 10 (default 3)."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rhYiwkpH7hLojezUYPrB4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares two text strings line by line, returning a unified diff along with counts of added, removed, and unchanged lines.","exampleAgentPrompt":"Can you diff these two versions of my config file and show me exactly what changed, with 5 lines of context around each change? Here's the old version: 'host=localhost\\nport=5432\\ndb=prod' and the new version: 'host=db.example.com\\nport=5432\\ndb=staging'.","exampleUseCases":[{"title":"Code review change summary","prompt":"I've got two versions of a Python function — the old one and the refactored one. Can you compare them line by line and tell me how many lines were added, removed, and kept the same? Show me the unified diff with 3 lines of context."},{"title":"Config file audit","prompt":"Before deploying, diff my old nginx.conf against the new one and show me every line that changed. Use 2 lines of context around each change so I can see the surrounding settings."},{"title":"Document revision tracking","prompt":"Here are two drafts of a legal clause — the original and the revised version. Show me a line-by-line diff with no surrounding context, just the changed lines, and tell me the total number of additions and deletions."}],"resultDescription":"Returns a unified diff string showing changed lines (prefixed with + or -) and surrounding context lines, plus integer counts for lines added, lines removed, and lines unchanged.","failureModes":["Input text exceeds 64 KiB limit — request rejected","Context value outside 0–10 range — validation error","Missing required fields 'a' or 'b' — bad request error","Network timeout for very large near-limit inputs"],"whenToPreferThis":"Use this endpoint when you need a quick, structured line-by-line text comparison with change counts and no dependency on a local diff tool. Ideal for agents comparing configuration files, source code snippets, or document drafts up to 64 KiB each. Prefer this over general-purpose LLM summarization when you need an exact, deterministic diff output with precise added/removed line counts.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T06:38:14.531Z","isFirstParty":false,"canonicalSlug":"centralcity-ai-text-diff-8fb59c58"}