Document comparison API
Version Story’s Rust-based comparison engine is deterministic: it produces the exact set of changes between two versions of a document, preserving footnotes, tables, numbering, and formatting. Compare two documents over plain HTTP and show your lawyers the PDF redline.
Quickstart with a coding agent
Paste one prompt into your coding agent. It signs you in through your browser, stores an API key, runs a test comparison, and puts the PDF redline in your app.
Quickstart by hand
Get a key, compare two documents with two HTTP calls, and show the PDF redline on a screen of your own.
Start with the PDF
A redline is a deliverable, not a diff. The PDF is the record a lawyer keeps and sends: the changes between two drafts exactly as they stood, the same pages in your app, in Slack, in an email and on paper. Build it first, then add the rest. Why the PDF
“Beautiful redlines matter to a law firm as a business. When we present to a company, we want polished deliverables, and Version Story’s PDF comparisons embed right in our client portal.”
Mitch Duncombe, CEO of Vector Legal
What the API does
| Capability | Produces |
|---|---|
| Compare | A true redline of every change between two versions of a document |
| Selective compare | One passage of a document compared with a passage of another, answered at once as JSON, Markdown and a PDF |
| Embed | The same redline as an interactive view in your own app, beside the PDF |
| Edit | A document changed as real Word tracked changes, with a redline of the edits |
| Create | A new Word document, written from the same edits, in your house style |
| Merge | One draft folding together several people's revisions of a shared base, each edit labeled by its source |
Every comparison renders to whichever deliverable you ask for:
- PDF redline: what a lawyer sees, sends and keeps. Start here
- Interactive HTML redline to embed beside it
- Word document with real tracked changes, to negotiate on
- PDF of only the changed pages
- Markdown with the changes marked inline, for a model to read
- Structured JSON of the changes, for code that acts on them
Start building
Issue an API key from the Developer page in the Version Story web app, or let a coding agent get one for you with a single click. New organizations start on an API trial.