Embed the AI Diff Summarizer
One JavaScript tag. A live git-diff → plain-English summarizer on your page. Uses your reader's own Anthropic API key (BYO model) — no backend cost. Same tool as diff-summarizer.vercel.app.
Copy-paste snippet
<script src="https://diff-summarizer.vercel.app/embed.js" async></script>
Drop it anywhere in your HTML — blog post, docs, README rendered as HTML, Ghost / Hashnode / Gitbook / Docusaurus / MkDocs. The widget appears right where the tag sits.
Live preview
Configuration
| Attribute | Default | What it does |
|---|---|---|
data-height | 640 | Iframe height in pixels (min 240). |
data-theme | auto | light, dark, or auto. |
data-target | (inline) | CSS selector. Widget mounts inside that element instead of inline. |
data-branding | show | Set to hide to remove the "Powered by" footer. |
Example: dark theme + tall iframe
<script
src="https://diff-summarizer.vercel.app/embed.js"
data-theme="dark"
data-height="800"
async
></script>
How costs work
- Free to embed. No signup, no rate limit, no paid tier.
- Your readers pay their own inference. The widget calls Anthropic directly with the reader's API key. Typical diff = under $0.01 with Claude Haiku.
- No keys leave the browser. The widget never sends the API key to any server other than Anthropic's.
FAQ
Why would I embed this?
If you write about code review, PR workflow, or Git tooling, an embedded diff summarizer lets readers paste a real diff and get a plain-English explanation without leaving your page — far better than a screenshot. Particularly strong on tutorial sites where you want readers to try the tool on their own messy diffs.
Is it free?
Yes — the widget is free. The reader's own API key pays for inference (typically pennies per diff). No backend cost to you or us.
Can I customize it?
Yes — see configuration table above. data-height, data-theme, data-target, and data-branding are supported.
Does this work on Notion / Substack / Medium?
Platforms that allow raw <script> tags: yes. Substack and Medium strip scripts; link to the full tool from those instead.
What models does it support?
Claude (Opus, Sonnet, Haiku) via Anthropic's API. The reader picks the model in the widget UI.