ForHosting KIT · Text & AI

Compare two texts

Diff tools show you which lines moved. They don't tell you that a contract's liability clause got quietly weaker, or that a policy update softened a commitment. The Text Comparison API reads two versions of a document and returns a plain-language account of what actually changed and why it matters, meant for the moments a line-by-line diff isn't enough.

● StablePer request + per 1,000 words$0.003
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

The gap between a diff and an explanation

Version control has given us excellent line-level diffing for decades, and that's the right tool when code or exact wording is what matters. But prose changes rarely line up cleanly — a paragraph gets rewritten, a sentence moves, a clause is reworded to say something subtly different. A character-level diff on that kind of edit produces a wall of red and green that technically shows everything and communicates almost nothing. This endpoint is built for the second kind of change: substantive, reworded, and easy to miss in a raw diff.

What the comparison actually returns

You POST two text versions to /text/compare. The task runs asynchronously and delivers, via webhook or a signed link, a structured summary: what was added, what was removed, what was reworded, and a short note on the apparent intent or impact of each substantive change. It is closer to what an attentive editor would tell you after reading both drafts than to a syntax-highlighted diff.

Where this kind of comparison already exists, informally

Legal teams have long paid paralegals to redline contract revisions by hand precisely because the stakes of missing a reworded clause are high, and 'track changes' tools only get you halfway there when wording — not just insertion or deletion — is what changed. Editors comparing manuscript drafts, compliance teams checking policy revisions, and support teams reviewing changelog language all do a version of this manually today. The task automates that reading, not the judgment call that follows it.

Built for a pipeline, not a one-off click

Because it's async and billed per call, the endpoint fits into recurring workflows: a document management system calls /text/compare every time a contract template is revised, or a documentation pipeline runs it on every changelog against the prior release. Nothing is billed for a task that fails outright — retries happen automatically up to three times before you see a clear error, so a batch of comparisons stays cost-predictable.

What it will and won't tell you

The output is a factual account of differences and a plain-language read of their likely significance — it won't render a legal opinion or certify compliance. Treat it as the first, fast pass that surfaces what deserves a closer human look, saving the time otherwise spent scanning two long documents side by side for the handful of edits that actually matter.

Contract revision review

A procurement team compares a vendor's revised terms against the last signed version to catch clauses that were reworded, not just added or removed.

Policy and terms-of-service updates

A compliance team runs every policy revision through the endpoint to get a plain-language summary before publishing an update notice to users.

Editorial draft tracking

A magazine compares a writer's second draft against the first to see which arguments shifted, beyond what track changes highlights.

Changelog and documentation audits

A dev tools company compares each release's docs against the prior version to confirm the changelog actually reflects what changed in the text.

How do I compare two texts with this API?

POST both versions to /text/compare; the task runs asynchronously and the comparison summary arrives by webhook or a signed link.

Is this text comparison API free to try?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

How is text comparison priced?

$0.003 per request plus $0.0135 per 1,000 words across both documents, charged only when the task completes successfully.

Does it just return a line-by-line diff?

No — it returns a plain-language summary of additions, removals, and reworded content, closer to an editor's notes than a syntax diff.

Can it compare very long documents?

Yes, there's no fixed word cap; pricing scales with total word count, so longer document pairs simply cost proportionally more.

What happens if a comparison task fails?

It's retried automatically up to three times, and you are never charged for a task that doesn't complete.

Can I use this for legal contract review?

It's a strong first pass that flags what changed and its likely significance, but it doesn't replace legal review or certify compliance.

How and when do I get the results?

Via a signed webhook, recommended for automated pipelines, or a signed link valid for 24 hours; documents are deleted after retention and never used for training.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/text/compare

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/text/compare \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"…"}'
{
  "text": "…"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "text.compare",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.003
Per 1,000 words$0.0135

Published price — no tokens, no invented credits. A failed task is never charged.

max_tokens20000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
422task_failedThe task failed after 3 retries. You are never charged for it.

Read the full KIT documentation →