Document Redline & Table Diff Edge API

Deterministic Myers redlines, numeric/date edit alerts, Word .docx Track Changes, and composite-key table diffs in milliseconds.

Deterministic two-level Myers O(ND) paragraph and word-level document diffing, automatic numeric/currency/percentage/duration/date change extraction, native OpenXML .docx Track Changes generation, and composite-key CSV/JSON table diffing.

document-processing procurement-ops revops developer-tools

Why Agents Call This API Instead of DIY

Prevents middle-of-context LLM skimming misses on buried numeric/date edits, cuts 40-page document review payloads by 90-98% in tokens, and emits real OpenXML <w:ins>/<w:del> .docx archives without brittle Python/LibreOffice dependencies.

DimensionDIY Inside Agent Sandbox / PromptDocument Redline & Table Diff Edge API (doc-redline)
Onboarding & AuthInstall packages, debug runtime errors, or manage API keysZero signup — instant HTTP 402 (x402 USDC) & remote MCP
Context & Token CostThousands of tokens spent in multi-turn code/parse loopsDeterministic compact JSON response (<1.5K tokens)
Schema ValidationSilent runtime failures on malformed inputsFree ?dry_run=true preflight ($0.00 on 4xx errors)

Tools & Payable Endpoints (2)

diff_documents — Redline & Audit Two Document Versions

$0.002 USD per document redline comparison (x402 instant micropayment)

Runs two-level Myers O(ND) section/paragraph and inline word-and-punctuation diffing across two document versions, returning sectionBreadcrumb-tagged hunks, CriticMarkup ({--old--}{++new++}), inline HTML (<del>/<ins>), dedicated numericAndDateChanges alerts, and optional native .docx Track Changes.

Why buy vs. DIY: Eliminates 95% of unchanged context tokens on multi-section specs/RFPs/SOWs, catches every altered number/currency/duration/date deterministically, and packages valid ECMA-376 .docx Track Changes ZIP archives on the edge.

diff_tables — Compare Two Structured CSV or JSON Tables by Primary Key

$0.002 USD per structured table or catalog diff (x402 instant micropayment)

Compares two JSON object arrays or RFC 4180 CSV strings keyed by a single or composite primaryKey, returning exact summary counts, added rows, removed rows, and cell-level modified diffs with exact decimal numericDelta.

Why buy vs. DIY: Avoids row-order false positives in line-based diffs and floating-point drift on price/inventory catalogs; supports composite keys like ['sku', 'region'] in <10ms.

Quickstart: MCP, x402 & Optional Bearer API Key

1. Streamable HTTP MCP Config (com.apikeg/doc-redline)

{
  "mcpServers": {
    "doc-redline": {
      "type": "streamable-http",
      "url": "https://doc-redline.apikeg.com/mcp"
    }
  }
}

Using a Monthly Stripe Plan? Get your per-email ak_live_... key at https://apikeg.com/account ($5 / $20 / $50 monthly tiers) and pass header Authorization: Bearer ak_live_... on REST or MCP requests.

2. Free Schema Dry-Run ($0.00)

curl -X POST "https://doc-redline.apikeg.com/v1/diff-documents?dry_run=true" \
  -H "Content-Type: application/json" \
  -d '{"original":"# Statement of Work\n\n## Section 4.2: Payment Terms\nCustomer shall pay all undisputed invoices within 30 days of receipt at $150/hour.","revised":"# Statement of Work\n\n## Section 4.2: Payment Terms\nCustomer shall pay all undisputed invoices within 45 days of receipt at $175/hour.","changedHunksOnly":true,"contextParagraphs":0,"ignoreWhitespace":true,"includeDocxTrackChanges":true,"docxAuthor":"Procurement Ops Bot"}'

Common Agent & Automation Workflows

Frequently Asked Questions

Why should an AI agent call Document Redline & Table Diff Edge API instead of writing custom code?

Prevents middle-of-context LLM skimming misses on buried numeric/date edits, cuts 40-page document review payloads by 90-98% in tokens, and emits real OpenXML <w:ins>/<w:del> .docx archives without brittle Python/LibreOffice dependencies.

How do I connect Document Redline & Table Diff Edge API to Claude, Cursor, or an MCP client?

Connect directly to the stateless Streamable HTTP MCP endpoint at https://doc-redline.apikeg.com/mcp (registry ID: com.apikeg/doc-redline). No API keys or OAuth accounts are required; initialize and tools/list are 100% free.

How much does Document Redline & Table Diff Edge API cost per API or MCP call?

Pay per call with zero signup via HTTP 402 (x402 v2 USDC on Base): diff_documents ($0.002 USD per document redline comparison (x402 instant micropayment)); diff_tables ($0.002 USD per structured table or catalog diff (x402 instant micropayment)). Prefer traditional monthly billing? Get a verified-email Bearer API key at https://apikeg.com/account with $5/mo ($6 credit), $20/mo ($28 credit), or $50/mo ($80 credit) per-product plans. Invalid schemas (HTTP 400) and ?dry_run=true always cost $0.00.

Can I validate request payloads for free before paying?

Yes. Pass ?dry_run=true in the URL or send the header X-Dry-Run: true to validate your JSON input against the strict schema at $0.00 cost.