Redline by Bookcicle
Playground Pricing Docs
Sign in Start Trial Account

Update Available A new version of this site is available.

DOCUMENT DIFFERENCE API

Add Track Changes
to your application.

Compare the text content of two versions across HTML, Markdown, TXT, JSON, DOCX, and searchable PDF. Review detected additions and deletions in HTML; DOCX comparisons can also produce a Word file with Track Changes.

Get API Key → Try Playground
  • HTML & DOCX
  • Developer Friendly
  • Scales with You
Service Agreement — Redline Diff

Service Agreement

This Agreement is made effective as of January 1, 2024 March 1, 2024 between Acme Corp and Global Solutions LLC.

The term of this Agreement shall commence on the effective date and shall continue for a period of one (1) year unless earlier terminated in accordance with the terms herein. two (2) years

Provider agrees to maintain minimum 99.9% uptime SLA and respond to severity 1 tickets within 4 hours 15 minutes.

Deletions Insertions

USED BY MODERN PUBLISHING & CAREER PLATFORMS

Redline Direct Document comparisons Bookcicle Studio Authoring & Publishing CareerGR CareerGR Career Reports & Scope
BUILT FOR DEVELOPERS BUILDING WHAT'S NEXT

A better way to compare documents.

Deterministic. Accurate. Production-ready.

</>

HTML Redlines

Compare the text content of two HTML documents and review additions and deletions with <ins>/<del> markup.

DOCX Track Changes

Get a real Microsoft Word document with native Track Changes you can open, review, and collaborate on in Word, Google Docs, or LibreOffice.

⚡

Fast & Reliable

Fast comparisons for short snippets and documents up to 10 MiB, with automatic safeguards for complex content.

Simple Integration

REST API, straightforward JSON responses, developer API keys, hosted viewers, and predictable pricing. Integrate into your app in minutes.

PLAYGROUND

Try Redline

Open the built-in sample for free, or compare your own text or files with your plan allowance.

Original HTML 0 chars
Revised HTML 0 chars
📄

Original DOCX

Drag & drop file here, or click to browse

No file selected
📄

Revised DOCX

Drag & drop file here, or click to browse

No file selected
Advanced options
Visual page comparison with highlighted additions and deletions
Queues background Word export with native tracked revisions (w:ins / w:del) Sign in to export. Anonymous comparisons remain available within limits.
ℹ️ Built-in samples open without using units. Your own files use your plan allowance and may have processing limits; view plans.
Details
Request
Response 200 OK
Word Track Changes DOCX Your Word document export has been queued in the background.
Queued Download .docx
Original
Revised
Like what you see? Use this comparison engine in your own application with one API call.
Get Free API Key →
DEVELOPER INTEGRATION

Integrate with one clean API call.

Zero complicated diff libraries to maintain. Just clean, semantic HTML in and out.

body='{"original":"<p>The fox jumped over the fence.</p>","revised":"<p>The quick fox jumped over the old fence.</p>","mode":"auto"}'
curl -X POST https://api.bookcicle.com/v1/redline/html \
  -H "Authorization: Bearer bc_live_..." \
  -H "Content-Type: application/json" \
  --data-binary "$body"
const body = JSON.stringify({
  original: "<p>The fox jumped over the fence.</p>",
  revised: "<p>The quick fox jumped over the old fence.</p>",
  mode: "auto"
});
const response = await fetch("https://api.bookcicle.com/v1/redline/html", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.REDLINE_API_KEY}`,
    "Content-Type": "application/json"
  },
  body
});
const { html, usage } = await response.json();
console.log("Semantic diff:", html);
import json, os, requests

body = json.dumps(
    {
        "original": "<p>The fox jumped over the fence.</p>",
        "revised": "<p>The quick fox jumped over the old fence.</p>",
        "mode": "auto"
    }, separators=(",", ":")
).encode()
response = requests.post(
    "https://api.bookcicle.com/v1/redline/html",
    headers={
        "Authorization": f"Bearer {os.environ['REDLINE_API_KEY']}",
        "Content-Type": "application/json",
    },
    data=body
)
data = response.json()
print("Redline HTML:", data["html"])
HOSTED COMPARISON VIEWER

Don't want to build a review UI?
Let Redline host it.

Pass output: ["html", "hosted_viewer"] to generate a private, access-controlled viewer or embed it directly into your dashboard with a responsive iframe.

HTML Iframe Embed
<iframe
  src="https://redline.bookcicle.com/embed/cmp_9f82d1?token=cmp_tok_abc123&theme=system"
  width="100%"
  height="600"
  loading="lazy"
  style="border:1px solid #e2e8f0; border-radius:8px;"
></iframe>
Explore Live Iframe Demos →
Embed Preview redline.bookcicle.com/embed/cmp_demo →
Contract Amendment v2

Section 4: Termination & Remedies

Either party may terminate this agreement upon 30 days 60 days written notice. In the event of material breach, cure period shall be ten (10) calendar days fifteen (15) business days.

All notices under this Section shall be given in writing and deemed served upon confirmed receipt.

Neither party shall be liable for indirect, incidental, or consequential damages resulting from early termination.

In the event of termination, licenses granted hereunder shall immediately terminate except as otherwise agreed.

Sections 5, 7, and 9 shall survive any termination or expiration of this Agreement.

Original

Section 4: Termination & Remedies

Either party may terminate this agreement upon 30 days written notice. In the event of material breach, cure period shall be ten (10) calendar days.

All notices under this Section shall be given in writing and deemed served upon confirmed receipt.

Neither party shall be liable for indirect, incidental, or consequential damages resulting from early termination.

In the event of termination, licenses granted hereunder shall immediately terminate except as otherwise agreed.

Sections 5, 7, and 9 shall survive any termination or expiration of this Agreement.

Revised

Section 4: Termination & Remedies

Either party may terminate this agreement upon 60 days written notice. In the event of material breach, cure period shall be fifteen (15) business days.

All notices under this Section shall be given in writing and deemed served upon confirmed receipt.

Neither party shall be liable for indirect, incidental, or consequential damages resulting from early termination.

In the event of termination, licenses granted hereunder shall immediately terminate except as otherwise agreed.

Sections 5, 7, and 9 shall survive any termination or expiration of this Agreement.

WHY DETERMINISTIC COMPARISON

Your AI changed the text.
Show your user the detected edits.

Redline compares the text content of two versions and marks detected additions and deletions. Review the result against the source documents before relying on it.

Text change review

Inspect detected wording, punctuation, and number changes in one result.

Clear support limits

The comparison does not guarantee preservation of layout, styles, table structure, or document structure.

Reviewable output

See detected text additions and deletions in HTML; DOCX comparisons can also produce native Word Track Changes.

PRICING

Simple, transparent pricing.

Start a 14-day free trial with your selected plan's Redline allowance.

Basic

$0/month

For playground experimentation and lightweight testing.

  • 100 Redline units / month shared across HTML & DOCX
  • HTML & DOCX comparisons
  • Native Word Track Changes via API
  • Playground access
  • Standard community docs
Get Started

Creator

$19/month

For production apps diffing user edits and AI updates.

  • 5,000 Redline units / month
  • HTML & DOCX comparisons
  • Interactive track changes review & Accept/Reject
  • Bidirectional postMessage callbacks & drop-in SDK
  • Developer API keys (up to 5)
  • 120 req/min rate limit
  • Hosted viewers & iframe embeds (24h–32h TTL)
  • Email developer support
Start Free 14-Day Trial
MOST POPULAR

Creator Pro

$39/month

For high-throughput publishing pipelines and team workflows.

  • 25,000 Redline units / month
  • HTML & DOCX comparisons
  • Interactive track changes review & postMessage callbacks
  • 300 req/min rate limit
  • Large document uploads up to 10 MiB (vs. 800 KiB inline)
  • Hosted viewers & iframe embeds (24h–72h TTL)
  • Priority developer support
Start Free 14-Day Trial

Team & Custom

Custom

For high-volume enterprise document workflows.

  • Higher volume units
  • Custom SLA options
  • Dedicated Slack channel
  • Custom deployment options
Contact Us
1 Redline unit = 100 KiB combined input. Calculated using UTF-8 byte sizes.
READY TO BUILD?

Get started with Redline today.

Join developers using Redline to power document comparison in their applications. Start a 14-day free trial with your selected plan's Redline allowance.

Get API Key → Read the Docs
PrivacyTermsCookiesSecurity

Privacy Policy

How Redline handles your documents, account information and service data.

Last updated: October 6, 2026

On this page
Who this policy coversInformation we processHow we use informationNo model trainingStorage and retentionProviders and sharingSecurity and international transfersYour rights and choicesChildrenUpdates and contact

Who this policy covers

Redline is operated by Bookcicle, LLC. This policy covers Redline’s website, API, document comparisons, hosted viewers and related support. Contact privacy@bookcicle.com with questions or requests.

Information we process

We process the original and revised text or files you submit, comparison settings, results and requested artifacts. Account information may include your name, email, authentication details, API key records, subscription and billing records, and support messages. Technical and usage information may include IP addresses, browser and device details, request times, usage counts and security logs.

How we use information

We use this information to compare documents, deliver results and downloads, administer accounts and plans, measure usage, provide support, diagnose problems, prevent abuse and meet legal obligations. Where applicable, our legal bases include performing our agreement with you, legitimate interests in operating and securing the service, consent, and legal obligations.

No model training

Redline’s comparison engine does not use generative AI. Bookcicle does not use your comparison inputs or outputs to train, fine-tune or improve AI models. We may use operational information, such as usage counts and performance measurements, to maintain and improve the service.

Storage and retention

Direct comparisons that do not need stored artifacts can be processed without saving submitted files or comparison content to persistent file storage. Uploads, downloads, hosted viewers, embeds and paginated results may require temporary storage. Standard temporary uploads are scheduled to expire after one day. Hosted comparisons and embeds may use longer retention according to their settings and service configuration.

Link and token expiration can differ from content retention. Expiration does not guarantee immediate deletion; cleanup may run later. Account, billing and security records are kept as needed to operate the service, comply with legal obligations and resolve disputes. Aggregated, anonymized operational data may be retained.

Providers and sharing

Service providers may process information on our behalf for hosting, payments, authentication, analytics and support, subject to appropriate instructions and safeguards. We may disclose information when required by law or necessary to protect rights and safety. Hosted viewer links and embed tokens are sharing credentials: anyone with a valid link or token may be able to view the associated comparison. Share them only with intended recipients.

Security and international transfers

We use encryption in transit, encryption at rest for stored information and access controls. No service can guarantee absolute security. Information may be processed outside your country, including in the United States. Where legally required, we use applicable transfer safeguards, including standard contractual clauses or other approved mechanisms. See our Security Policy.

Your rights and choices

Depending on your location, you may request access, correction, deletion, portability, restriction or objection to processing, withdraw applicable consent, and complain to a data protection authority. Certain US state laws also provide rights to opt out of sale, sharing or targeted advertising and to appeal a denied request. We honor applicable opt-outs and Global Privacy Control signals where required. Send requests or appeals to privacy@bookcicle.com; we may need to verify your identity. See our Cookie Policy for browser storage choices.

Children

Redline is not intended for children under 13. Where a higher local age applies, users must meet that age or have the required parental consent. Contact us if you believe a child’s information has been collected.

Updates and contact

We may update this policy as practices or requirements change. Material changes will be communicated on the site or through other appropriate channels. Bookcicle, LLC: 373 S Willow St, Unit 240, Manchester, NH 03103, USA. Email: privacy@bookcicle.com.

PrivacyTermsCookiesSecurity

Terms of Service

The terms for using Redline’s website, comparisons, API and hosted viewers.

Last updated: October 6, 2026

On this page
Your agreementComparisons and reviewYour content and permissionsAccounts, keys and shared linksPlans, charges and cancellationService ownershipWarranties and liabilityResponsibility for claimsChanges and terminationGoverning law and contact

Your agreement

These terms are an agreement between you and Bookcicle, LLC for Redline. By using Redline, you accept these terms. If you use it for an organization, you must have authority to bind that organization. Our Privacy Policy describes how we handle information.

Comparisons and review

Redline compares documents and text and may return redline markup, page previews, Word Track Changes downloads or hosted viewers, depending on the requested format and feature. Review every result before relying on it: extraction, formatting and comparison results can be incomplete or inaccurate. Redline does not provide legal advice or determine the legal effect of a revision. Rendered source pages are read-only; review decisions do not regenerate those previews.

Your content and permissions

You retain your rights in the documents you submit. You must have the rights and permissions needed to submit them and authorize their processing and any sharing you request. You authorize Bookcicle and its service providers to process that content to deliver the requested service. Do not submit content that violates law, infringes another person’s rights or contains malicious code.

Accounts, keys and shared links

Provide accurate account information and protect your login details and API keys. You are responsible for activity through your account and keys until they are revoked. Do not bypass usage limits, probe other users’ data or disrupt the service. Anyone holding a valid viewer link or embed token may be able to access that comparison. You are responsible for selecting recipients and protecting sharing credentials.

Plans, charges and cancellation

The purchase and account screens state your plan, usage allowances, limits, trial terms and applicable charges. You authorize the displayed charges and applicable taxes and must use a payment method you are entitled to use. Subscription renewal and cancellation follow the terms shown at purchase. Cancelling stops future renewal; it does not erase charges already incurred. Contact support@bookcicle.com about billing errors or failed delivery. Any non-waivable consumer rights remain in effect.

Service ownership

Bookcicle and its licensors retain rights in the Redline service, interface, software and branding. Your submitted content is excluded from that ownership. Third-party components remain subject to their applicable licenses; those licenses control for those components if they conflict with these terms.

Warranties and liability

To the fullest extent permitted by law, Redline is provided “as is” and “as available,” without express or implied warranties, including merchantability, fitness for a particular purpose, accuracy and non-infringement. We do not guarantee uninterrupted or error-free service.

To the fullest extent permitted by law, Bookcicle and its partners and licensors are not liable for indirect, incidental, consequential, special, exemplary or punitive damages, including lost data, business or profits. Bookcicle’s maximum aggregate liability arising from these terms or the service is US $100. These exclusions do not limit liability or rights that applicable law does not allow to be limited.

Responsibility for claims

To the extent permitted by law, you agree to defend and indemnify Bookcicle and its representatives against third-party claims and related costs arising from your breach of these terms, unlawful use of the service or infringement of others’ rights through content you submit.

Changes and termination

We may modify or discontinue features and suspend or terminate access for violations, abuse or other reasons permitted by law. You may stop using Redline at any time. Obligations concerning accrued charges, ownership, liability and disputes survive termination. Material changes to these terms will be communicated through the site or another appropriate channel; continued use after notice signifies acceptance.

Governing law and contact

These terms are governed by New Hampshire law, without its conflict-of-law provisions. Disputes are subject to the applicable New Hampshire state courts or federal courts in the District of New Hampshire, except where mandatory law requires otherwise. If a provision cannot be enforced, the remaining provisions remain in effect.

Contact Bookcicle, LLC at support@bookcicle.com or 373 S Willow St, Unit 240, Manchester, NH 03103, USA.

PrivacyTermsCookiesSecurity

Cookie Policy

How Redline uses cookies and similar browser storage.

Last updated: October 6, 2026

On this page
Cookies and browser storageWhat storage is used forYour controlsPrivacy and updates

Cookies and browser storage

Cookies are small files stored by your browser. Redline also uses local storage and similar technologies to maintain sessions, remember preferences and support the service. Some storage expires with a session; other values remain until they expire or you clear them.

What storage is used for

  • Essential: authentication, security and access to requested features.
  • Preferences: theme, viewer choices and returning-user navigation.
  • Measurement: usage and attribution identifiers that help us understand visits, service reliability and interactions.
Sign-in, payment and other integrated providers may use their own cookies or storage when you interact with those features. Their handling of information is subject to their own policies.

Your controls

You can inspect, block or clear cookies and site storage through your browser’s settings. Clearing storage may sign you out or reset preferences; blocking essential storage may prevent features from working. Where applicable law provides an opt-out, contact privacy@bookcicle.com. We honor Global Privacy Control signals where required. Clearing storage does not cancel a subscription or delete stored comparison artifacts.

Privacy and updates

Our Privacy Policy explains how information is used, shared and retained. We may update this policy as practices change and communicate material changes through the site or other appropriate channels. Questions: privacy@bookcicle.com.

PrivacyTermsCookiesSecurity

Security Policy

How we protect Redline and handle security concerns.

Last updated: October 6, 2026

On this page
Data protectionAccess and shared comparisonsMonitoring and responseSOC 2 StatusReport a security issueLimits and updates

Data protection

  • We employ end-to-end encryption for connections to all service endpoints, and encryption at rest for stored information.

We use access controls. Redline’s comparison engine does not use generative AI, and comparison inputs and outputs are not used for model training. Our Privacy Policy describes storage and retention.

Access and shared comparisons

Keep account credentials and API keys private, revoke keys you no longer need, and share hosted viewer links or embed tokens only with intended recipients. A valid link or token may grant access to the associated comparison. Link expiration and content deletion are separate processes.

Monitoring and response

We monitor for unusual activity and use safeguards to detect and prevent unauthorized access and abuse. Security issues are investigated and addressed through our operational processes. If an incident requires notification under applicable law, we notify affected users through appropriate channels.

SOC 2 Status

Redline is actively working toward SOC 2 Type II readiness. We are currently reviewing our technical and operational controls, remediating identified gaps, and formalizing evidence collection and security processes. We have not yet completed a SOC 2 examination.

Report a security issue

Report potential vulnerabilities to security@bookcicle.com. Include enough detail to reproduce the issue, without sending unnecessary personal or document information. Avoid disrupting the service or accessing other users’ information. We investigate legitimate reports and take appropriate action.

Limits and updates

No system is completely secure, and we cannot guarantee absolute security. We may update this policy as our practices evolve and communicate material changes through the site or other appropriate channels. Redline is operated by Bookcicle, LLC.

Documentation

  • Quickstart
  • Authentication & Keys
  • Content Comparison API
  • Structured JSON Contract
  • Documents API (DOCX & PDF EA)
  • Performance & Expectations
  • Large File Uploads
  • Hosted Viewer & Embeds
  • Drop-in Embed SDK
  • CSS Styling Contract
  • Units & Quota
  • Error Reference
  • Rate Limits

Search headings, endpoints, and error codes.

    Redline API Quickstart

    Compare HTML, Markdown, plain text, JSON, DOCX, or searchable PDF. Get an HTML redline, structured JSON changes, or both. DOCX also supports optional Word Track Changes. Document diffs compare text and supported styles. Optional rendered pages show source layout; DOCX fonts and pagination can differ from Word. Images are displayed, but not compared. Scanned PDFs need OCR.

    Send two strings to the content comparison endpoint. These examples use anonymous access within quota; authenticated API calls add the Bearer header described below. The response contains the detected changes.

    Python

    Install the requests package, then run:

    import requests
    
    response = requests.post(
        "https://api.bookcicle.com/v1/redline/html",
        json={"original": "One year.", "revised": "Two years."},
        timeout=30,
    )
    response.raise_for_status()
    print(response.json())

    curl

    curl https://api.bookcicle.com/v1/redline/html \
      -H 'Content-Type: application/json' \
      -d '{"original":"One year.","revised":"Two years."}'

    JavaScript

    const response = await fetch("https://api.bookcicle.com/v1/redline/html", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ original: "One year.", revised: "Two years." })
    });
    if (!response.ok) throw new Error(`HTTP ${response.status}`);
    console.log(await response.json());

    Base URL

    https://api.bookcicle.com/v1

    Authentication

    Anonymous callers can receive HTML comparisons within the existing anonymous size, rate, and usage limits. Exports require a signed-in user or a valid API key. Anonymous callers cannot create export jobs or obtain export download URLs. A private comparison or viewer token does not authorize exports.

    All authenticated requests require a Bearer token in the Authorization header:

    Authorization: Bearer bc_live_0123456789abcdef0123456789abcdef

    You can generate an API key in the API Keys Dashboard. Never share or commit your secret key.

    Send your Bearer token and JSON content type. Signed upload URLs include their own authorization.

    Payload signing: For direct document requests larger than 1 MiB of serialized JSON, clients must also send x-amz-content-sha256 containing the lowercase SHA-256 digest of the complete request body. Browsers and client SDKs supply this automatically.

    Request headers
    HeaderWhen requiredValue / behavior
    AuthorizationAuthenticated API calls; required for exportsBearer <API_KEY_OR_ACCESS_TOKEN>. Private comparison GETs can use their returned viewer token; export jobs and download URLs require authentication.
    Content-TypeJSON POST requestsapplication/json. Presigned uploads use the content type supplied when requesting the upload.
    AcceptDocument streaming requeststext/event-stream for POST /v1/redline/documents; application/json for JSON API responses.
    Idempotency-KeyOptional: document comparisonReuse the same key when retrying the same input comparison.
    X-Viewer-TokenOptional alternative on private comparison GETsUse the comparison token when a token query parameter is not supplied.

    Content Comparison API (Format-Agnostic)

    Compare HTML, Markdown, plain text, or JSON in one synchronous request. Additions use <ins>; deletions use <del>.

    POST /v1/redline/html
    Content-Type: application/json
    
    {
      "original": "<p>The fox jumped over the fence.</p>",
      "revised": "<p>The quick fox jumped over the old fence.</p>",
      "mode": "auto",
      "format": "html",
      "output": ["html"]
    }

    Choose output: ["html"] (default), ["json"], or ["html", "json"]. These select fields in the response object.

    Content comparison request
    FieldTypeRequired / defaultMeaning
    originalstring or upload referenceRequiredBaseline content, or {"uploadId":"..."} for staged inputs.
    revisedstring or upload referenceRequiredRevised content, or {"uploadId":"..."} for staged inputs.
    formatstring"auto"html, markdown / md, txt / plain, json, or auto. Markdown becomes canonical HTML; JSON source is canonicalized and key-sorted.
    modestring"auto"auto, word (inline words), or block (larger text segments).
    outputarray of strings["html"]["html"], ["json"], or ["html", "json"]. Pass "hosted_viewer" in the output array to receive a secure embed token and hosted comparison URL (comparisonId, viewerUrl, embedUrl, and viewerToken; aliases: viewer, embed). These select object fields, not an array response.
    hostedViewerTtlstring or integer"24h"Adjustable availability and token validity window for hosted embeds (when "hosted_viewer" is in output). Creator tier supports "24h" (default) or "32h". Creator Pro supports "24h" (default), "32h", "48h", or "72h". Integer hours (24, 32, 48, 72) or seconds (e.g. 86400) are also accepted.

    Pass "hosted_viewer" in the output array to receive a secure embed token and hosted comparison URL. See Hosted Viewer & Embeds.

    JSON changes refer to the output HTML. See Structured JSON Contract, for the output schema and HTML location mapping.

    Content comparison response
    FieldTypePresenceMeaning
    schemaVersionstringAlwaysredline.html.v1 for HTML-only; redline.comparison.v1 when JSON is requested.
    htmlstringHTML requestedHTML redline fragment for rendering; omitted for JSON-only.
    cssUrlURL stringAlwaysPublic Redline v1 stylesheet for the current environment. Load once in your rendering document.
    jsonobjectJSON requestedFirst page of structured changes; see the JSON tables below.
    changesUrlURL stringJSON requestedPrivate pagination endpoint; preserve its token. Relative URLs resolve against the API origin.
    requestedMode / effectiveModestringAlwaysRequested and selected text diff modes.
    format / engine / fallbackstring / string / booleanAlwaysEffective input format; dom / text engine; whether fallback was used.
    unitsintegerAlwaysComparison’s metered Redline units.
    usageobjectAlwaysused, allowance, remaining, and plan for the account.
    comparisonIdstringStored comparisonIdentifier for stored comparison retrieval.
    viewerUrl / embedUrlURL stringStored HTML availableBrowser review and embed pages, including private access tokens. These are viewer pages, not raw HTML download URLs.
    viewerTokenstringStored HTML availablePrivate comparison access token; treat as a credential.

    Small text comparisons can reuse a caller-scoped result for 60 minutes when inputs and options match. Cache hits do not consume additional units; simultaneous first requests may both be charged. Document retries use Idempotency-Key instead.

    Response

    {
      "schemaVersion": "redline.html.v1",
      "cssUrl": "https://dev.redline.bookcicle.com/styles/v1/redline.css",
      "html": "<p>The <ins>quick </ins>fox jumped over the <ins>old </ins>fence.</p>",
      "requestedMode": "auto",
      "effectiveMode": "word",
      "format": "html",
      "engine": "dom",
      "fallback": false,
      "units": 1,
      "usage": {
        "used": 142,
        "allowance": 25000,
        "remaining": 24858
      }
    }

    Structured JSON Contract

    Changes are anchored to the comparison’s HTML representation for every input format. The engine collects changes before serializing HTML; text fallback uses its diff segments.

    Request ["html", "json"] for rendering and structured changes. JSON-only output still refers to the HTML comparison representation. Pass "hosted_viewer" in the output array to receive a secure embed token and hosted comparison URL.

    What locations refer to

    Locations describe normalized HTML, not source coordinates. They do not provide PDF page numbers or bounding boxes, Word revision IDs, JSON Pointer paths, byte offsets, or table-cell coordinates.

    Structured change fields
    FieldType / presenceMeaning
    idstring; alwaysDocument-order change ID, such as chg_000001. Stable across pages of the same comparison. They are not HTML element IDs, DOM selectors, or identifiers guaranteed to survive a new comparison.
    typestring; alwaysinsert, delete, replace, format, link, block_insert, block_delete. Adjacent deletion/insertion groups can form a replacement.
    location.blockIndexinteger; alwaysBlock counter in traversal of the HTML comparison representation. DOM blocks start at 1; 0 can indicate a change outside a recognized block. Not a source paragraph number or character offset.
    location.blockTypestring; optionalHTML block type, such as p or h1. Unavailable in text fallback.
    location.headingPath / sectionTitlearray of strings / string; optionalSurrounding headings and nearest heading title in the HTML representation. Empty context is omitted.
    before / afterobject; conditionalInsertions omit before; deletions omit after.
    before.text / after.textstring; on present fragmentsChanged text, usable by agents without parsing HTML.
    before.html / after.htmlstring; on present fragmentsHTML of the changed content, not a full source document.
    before.format / after.formatobject; optionalSemantic or presentation formatting when available.
    before.href / after.hrefstring; optionalLink destination when available; omitted in text fallback.

    Use fragment text and heading context to summarize edits. Request HTML too when rendering a redline. Applying changes to the original file requires your own source mapping.

    Structured JSON page fields
    FieldType / presenceMeaning
    schemaVersionstring; always"1"; independent of the outer API schema version.
    comparisonIdstring; optionalStored comparison identifier.
    format / engine / fallback / attributeModemetadata; alwaysInput format and engine behavior. Locations still refer to HTML representation.
    summaryobject; alwaysWhole-comparison counts: changeCount, insertions, deletions, replacements, formatChanges, linkChanges, blockInsertions, blockDeletions.
    changesarray; alwaysChanges on the current page.
    totalChangesinteger; alwaysNumber of changes in the complete comparison.
    offset / limitinteger; alwaysZero-based page offset; default limit 100, maximum 500.
    nextOffsetinteger; optionalNext page offset; omitted when there are no further changes.

    Example: both outputs (response excerpt)

    {
      "cssUrl": "https://dev.redline.bookcicle.com/styles/v1/redline.css",
      "html": "<h1>Terms</h1><p>Pay within <del>30</del><ins>45</ins> days.</p>",
      "json": {
        "schemaVersion": "1",
        "comparisonId": "cmp_example",
        "format": "html",
        "engine": "dom",
        "fallback": false,
        "attributeMode": "semantic",
        "summary": {
          "changeCount": 1,
          "insertions": 0,
          "deletions": 0,
          "replacements": 1,
          "formatChanges": 0,
          "linkChanges": 0,
          "blockInsertions": 0,
          "blockDeletions": 0
        },
        "changes": [{
          "id": "chg_000001",
          "type": "replace",
          "location": {
            "blockIndex": 2,
            "blockType": "p",
            "headingPath": ["Terms"],
            "sectionTitle": "Terms"
          },
          "before": { "text": "30", "html": "30" },
          "after": { "text": "45", "html": "45" }
        }],
        "totalChanges": 1,
        "offset": 0,
        "limit": 100
      },
      "changesUrl": "https://api.bookcicle.com/v1/redline/comparisons/cmp_example/changes?token=EXAMPLE_PRIVATE_TOKEN"
    }

    Metadata, fallback, and pagination

    Text fallback omits heading, block-type, formatting, and link context. Use before.text and after.text.

    Follow nextOffset by GETting changesUrl with &offset=<nextOffset>&limit=100. Keep its private token. No nextOffset means the last page; the summary covers the whole comparison.

    DOCX/PDF return this schema in content_complete.contentDiff.json, with contentDiff.changesUrl. Word Track Changes uses separate revision IDs and counts.

    Documents API (DOCX & PDF Early Access)

    Direct small-document input

    For DOCX or PDF pairs up to 750 KiB combined file bytes, send both files as base64 in the comparison request. This skips upload authorization and file transfer. Larger pairs use upload IDs. Both sources must use the same input method.

    {
      "format": "pdf",
      "original": { "dataBase64": "<base64 original file bytes>", "contentType": "application/pdf" },
      "revised": { "dataBase64": "<base64 revised file bytes>", "contentType": "application/pdf" },
      "mode": "auto",
      "output": ["html", "json"],
      "metrics": true
    }

    Word exports require authentication. Anonymous callers may request an HTML comparison within quota. If an anonymous request also asks for track_changes, the stream emits track_changes_failed with code export_authentication_required, then continues the HTML comparison and normal completion without an export job. Supply an authenticated Bearer token to create an export or retrieve its download URL. Replaying a cached anonymous comparison does not restore export access.

    Upload two DOCX files or two searchable PDFs, then stream progress with SSE. Request HTML, JSON, or both; JSON changes use the same native comparison as the HTML response. Native Word Track Changes is default off and DOCX-only. Output fields and options are listed below.

    Document comparison request
    FieldTypeRequired / defaultMeaning
    formatstringRequireddocx or pdf; both files must use the same format.
    original.uploadId / revised.uploadIdstringRequired for uploaded inputsUpload IDs from the upload endpoint. Legacy originalUploadId / revisedUploadId aliases are also accepted.
    original.dataBase64 / revised.dataBase64stringRequired for direct inputsBase64 raw file bytes; use both sources together instead of upload IDs. Public limit: 750 KiB combined raw bytes.
    original.contentType / revised.contentTypestringOptional for direct inputsDeclared MIME type must match the selected document format.
    modestring"auto"auto / word / block for the HTML comparison engine.
    attributeModestring"semantic"semantic / presentation for HTML attribute comparison.
    outputarray of strings["html"]["html"], ["json"], ["html", "json"]. Pass "hosted_viewer" in the output array to receive a secure embed token and hosted comparison URL (contentDiff.comparisonId, contentDiff.hostedUrl; alias: viewer). Native Word Track Changes is default off; pass "track_changes" in the output array to queue background generation of a .docx file with native Word tracked revisions.
    pageRenderingbooleanfalseReturn source-page PDFs after the text diff. Applies to both formats; omission and false skip all page rendering.
    metricsbooleanfalseSet true to include server processing metrics in content_complete and complete, including totalMs and downloadMs.
    titlestringOptionalDisplay title for stored comparisons.
    Document content_complete event
    FieldType / presenceMeaning
    requestId / formatstring; alwaysRequest identifier and source document format.
    unitsinteger; alwaysComparison’s metered units.
    contentDiff.htmlstring; HTML requestedHTML rendered from the semantic document diff.
    contentDiff.cssUrlURL string; alwaysSame rendering contract as text API cssUrl; current environment’s public v1 CSS.
    contentDiff.jsonobject; JSON requestedSame structured JSON page schema as the text API.
    contentDiff.changesUrlURL string; JSON requestedPrivate pagination URL; relative paths resolve against the API origin.
    contentDiff.engine / fallbackstring / boolean; alwaysComparison engine and fallback status.
    contentDiff.comparisonId / hostedUrlstring / URL; stored outputStored comparison identifier and private retrieval URL. hostedUrl retrieves JSON containing HTML; it is not a raw HTML page.
    contentDiff.earlyAccessboolean; optionalEarly Access status when supplied.

    Why the HTML redline and Word Track Changes can differ

    The semantic document diff supplies HTML; Word exports compare the original DOCX pair independently.

    Grouping, counts, and revision IDs may differ. mode does not configure the Word Track Changes comparator. Review each output against the source files.

    Rendered source pages

    Set pageRendering: true for page previews. The stream sends content_complete first, then page_rendering_complete with private PDF URLs, each side’s page count, the renderer and renderMs. URLs expire after 15 minutes; stored artifacts expire after 24 hours.

    event: page_rendering_complete
    data: {"schemaVersion":"redline.pages.v1","renderer":"<renderer identifier>","renderMs":210,"pages":[{"side":"original","pdfUrl":"<private URL>","pageCount":2,"expiresInSeconds":900},{"side":"revised","pdfUrl":"<private URL>","pageCount":3,"expiresInSeconds":900}]}

    PDF previews preserve source bytes, page sizes and rotation. DOCX preview layout depends on available fonts; exact Word pagination is not guaranteed. The UI displays one page per side and highlights unambiguous text changes. The text comparison contains every supported change, including repeated text and style edits.

    Review actions: Rendered pages are read-only. Use the interactive HTML review viewer for Accept/Reject, or review native DOCX Track Changes in Word. Review decisions do not update the source-page previews.

    page_rendering_failed leaves the successful text diff available. Rendering is bounded to 1,000 pages, 32 MiB per PDF and 30 seconds of DOCX layout per side, within a 55-second request budget. Document comparison screens enable pages; the playground starts off and offers a checkbox.

    Stream completion: Require both content_complete and complete; HTTP 200 only opens the stream. error means comparison failure. track_changes_failed and page_rendering_failed affect only their optional outputs.

    Metrics: Use content_complete.metrics.totalMs for the semantic result and complete.metrics.totalMs for all requested work. comparisonMs measures server time through the semantic result and stays unchanged in final completion. pageRenderingMs measures optional page preparation and storage, including failed attempts; it is zero before rendering or when disabled. diffMs measures only the diff engine. renderMs in a successful page event measures page preparation and storage. Direct inputs report downloadMs: 0; upload transfer and browser painting are excluded.

    Upload and stream example
    1. For the upload path, presign and upload both documents via POST /v1/redline/uploads.
    2. Stream comparison via SSE with upload references:
      POST /v1/redline/documents
      Authorization: Bearer bc_live_...
      Content-Type: application/json
      Accept: text/event-stream
      
      {
        "format": "docx",
        "original": {
          "uploadId": "upl_orig_123"
        },
        "revised": {
          "uploadId": "upl_rev_456"
        },
        "mode": "auto",
        "output": ["html", "track_changes"]
      }
    3. Receive ordered real-time SSE progress events with self-contained job polling URLs:
      event: accepted
      data: {"requestId":"req_abc"}
      
      event: validating
      data: {"format":"docx"}
      
      event: converting
      data: {"side":"original"}
      
      event: converting
      data: {"side":"revised"}
      
      event: comparing
      data: {"mode":"auto"}
      
      event: content_complete
      data: {"requestId":"req_abc","format":"docx","contentDiff":{"html":"...","engine":"document","fallback":false},"units":2}
      
      event: track_changes_queued
      data: {"jobId":"job_789","status":"queued","pollUrl":"https://api.bookcicle.com/v1/redline/jobs/job_789","artifactType":"track_changes_docx"}
      
      event: complete
      data: {"requestId":"req_abc","status":"complete","jobs":[{"type":"track_changes_docx","jobId":"job_789","pollUrl":"https://api.bookcicle.com/v1/redline/jobs/job_789"}],"jobId":"job_789","units":2}

    Performance & Expectations

    Live DEV measurements cover native DOCX/PDF → HTML/JSON and HTML, Markdown, TXT and JSON snippets. Upload cases use files already uploaded; direct/inline cases submit source bytes. DOCX sizes are nominal fixture labels; PDF counts describe source pages.

    Expected Server Processing

    FixtureInputExpected Server ProcessingPage RenderingEngine
    HTML snippetinline~72 msN/Adom
    TXT snippetinline~73 msN/Adom
    MD snippetinline~73 msN/Adom
    JSON snippetinline~76 msN/Adom
    Small DOCX agreement fixtureupload~132 ms~158 msdocument
    Small DOCX agreement fixturedirect~71 ms~158 msdocument
    DOCX 10 nominal-page fixtureupload~139 ms~264 msdocument
    DOCX 10 nominal-page fixturedirect~78 ms~264 msdocument
    DOCX 50 nominal-page fixtureupload~245 ms~853 msdocument
    DOCX 50 nominal-page fixturedirect~173 ms~853 msdocument
    DOCX 250 nominal-page fixtureupload~490 ms~6393 msdocument
    DOCX 250 nominal-page fixturedirect~401 ms~6393 msdocument
    PDF 2 pagesupload~159 ms~109 msdocument
    PDF 2 pagesdirect~76 ms~109 msdocument
    PDF 10 pagesupload~177 ms~114 msdocument
    PDF 10 pagesdirect~101 ms~114 msdocument
    PDF 50 pagesupload~278 ms~116 msdocument
    PDF 250 pagesupload~966 ms~209 msdocument
    PDF 500 pagesupload~2019 ms~398 msdocument

    Typical warm processing estimates for uncached comparisons. Page Rendering is optional server preparation, excludes browser drawing and is additional to comparison time. Rendering estimates apply to the same fixture across input methods.

    What the timings include

    Published server timings use metrics.totalMs and exclude upload authorization, file transfer, network transit and browser rendering. They include source retrieval, parsing, comparison, HTML/JSON response preparation and normal request work. Baseline rows skip optional page preparation.

    Comparisons bypass caches: snippets require Cache-Control: no-store and server confirmation; documents omit idempotency keys. Authentication caching remains enabled. These fixture results are not a promise for every document under 10 pages. Density, cold starts, structure and outputs affect timing.

    Measure client completion separately. Its difference from server processing includes transport, buffering and client handling; it is not a measurement of network time alone.

    The full report includes larger/denser inputs, concurrent requests and failed qualifications. Failed output gets no timing claim. Benchmark report · Raw evidence · Page-flow validation.

    Capability Matrix

    Capability Word DOCX Searchable PDF Plain Text / Markdown / JSON
    Searchable text & content comparison Yes Yes Yes
    Punctuation & word-level diffing Yes Yes Yes
    Source document structure No guarantee No guarantee No guarantee
    Text inside tables When extracted When extractable As text
    Source formatting preservation No guarantee No guarantee No guarantee
    Hyperlink destination changes (href) When preserved by conversion Not guaranteed Markdown links
    Native Word Track Changes export (.docx) Yes (Async worker) No (HTML diff only) No
    Scanned / Image-only PDF (OCR) No (Rejected) No (Rejected as non-text) N/A
    Visual / Pixel / Layout comparison No No No
    Deterministic large-document fallback Yes Yes Yes

    What Redline Compares vs. What It Excludes

    Redline draws a principled boundary between semantic document revisions and cosmetic rendering artifacts:

    • Compared: Words, numbers, symbols, punctuation, paragraph boundaries, headings, bullet/numbered lists, blockquotes, table contents, semantic inline tags (<strong>, <em>, <u>, <s>, <sup>, <sub>, <mark>), and hyperlink URLs.
    • Excluded: Font family typography (e.g. Arial vs Calibri), font size, font color, background shading, margin dimensions, page size (Letter vs A4), orientation, multi-column flows, line spacing, dynamic page break shifts, decorative headers/footers, and embedded shapes/drawing canvases.

    Deterministic Complexity Fallbacks

    When document structural complexity exceeds the DOM processing envelope (>512 KiB HTML, >1,500 block elements, or >12,000 total tags), the engine automatically falls back to a linear text-stream comparison. This preserves complete change detection for text, numbers, punctuation, and paragraphs in tens of milliseconds, keeping complex comparisons within processing limits.

    Operational Limits

    LimitValue
    Direct DOCX/PDF input750 KiB combined. Larger pairs use uploads.
    Upload size10 MiB combined, uncompressed. Without signing in: 5 MiB per file.
    Billing unit100 KiB (102,400 bytes) of combined content.
    Server timeout60 seconds.
    ZIP safeguards100:1 maximum expansion ratio; 1,000 entries maximum.

    Large File Uploads

    For text formats, the inline limit is 800 KiB (819200 bytes) for the complete UTF-8 JSON request, including escaping, field names, and options. Measure the serialized request, not just the document text. Larger comparisons use uploads.

    1. Request POST /v1/redline/uploads for each input with filename, contentType, and its UTF-8 sizeBytes. Text inputs use text/plain; charset=utf-8. Each response returns uploadId and uploadUrl.
    2. PUT the raw input bytes to each uploadUrl, using the same content type. Limits are 5 MiB per anonymous input and 10 MiB per authenticated input. Use the same identity to authorize uploads and compare them.
    3. For HTML, Markdown, JSON, or plain text, call POST /v1/redline/html with upload references. Keep the same mode, format, and output options. DOCX and PDF continue to use POST /v1/redline/documents.
    {
      "original": { "uploadId": "upl_12345678-1234-4234-9234-123456789abc" },
      "revised": { "uploadId": "upl_87654321-4321-4321-9321-abcdef123456" },
      "mode": "word",
      "format": "html",
      "output": ["html"]
    }

    For text formats, check the complete serialized request against the 800 KiB limit. For PDF/DOCX, choose direct input up to 750 KiB combined raw file bytes and uploads above that threshold. Upload IDs belong to the identity that created them; they are not arbitrary storage paths.

    Hosted Viewer & Embeds

    Redline can generate a hosted, access-controlled text comparison viewer or provide responsive iframe embed codes without needing to build custom review UI in your application.

    Pass "hosted_viewer" in the output array to receive a secure embed token and hosted comparison URL:

    <iframe
      src="https://redline.bookcicle.com/embed/cmp_9f82d1?token=cmp_tok_abc123&theme=system&collapse=true"
      width="100%"
      height="600"
      loading="lazy"
      style="border:1px solid #e2e8f0; border-radius:8px;"
    ></iframe>
    Supported iframe query parameters
    ParameterDescription
    theme=system|light|darkForces color scheme.
    view=unified|splitSets initial layout.
    collapse=true|falseCollapses or expands long unchanged text runs (defaults to true).
    controls=falseSuppresses viewer top navigation chrome.
    bg=transparentRemoves background fill for seamless container embedding.
    review=true|falseEnables interactive track changes review with inline Accept/Reject buttons and progress tracking (Creator & Creator Pro).

    Interactive Track Changes Review Mode (Creator & Creator Pro)

    Redline enables interactive change-by-change review inside embedded viewers. End-users can accept or reject individual insertions and deletions or bulk-resolve changes using Accept All and Reject All. Every action dispatches bidirectional window.postMessage events to your host application.

    Unified Layout Lock: When Review Mode is active (review=true or via redline:startReview), the viewer is automatically locked into Unified layout. The Split layout option is explicitly disabled in the UI and via postMessage commands during active review to preserve synchronous inline Accept/Reject action buttons, change boundaries, and DOM hierarchy. Split mode re-enables once review is completed or exited.

    Review Completion & Clean Block Pruning: When resolving changes, rejected insertions (or accepted deletions) that span entire list items (<li>) or paragraphs (<p>) automatically prune empty container nodes so no orphaned bullets or blank lines remain. Once all changes are reviewed one-by-one, Accept All and Reject All are dismissed leaving Finish Review as the sole action, alongside a floating bottom-right completion prompt ensuring users never miss the final export step.

    Bidirectional PostMessage Protocol

    Listen for review callbacks in your host container:

    window.addEventListener("message", (event) => {
      const { type, ...payload } = event.data || {};
    
      if (type === "redline:changeResolved") {
        // Fired whenever an individual change is accepted or rejected
        console.log(`Change ${payload.changeId} ${payload.action}ed. Remaining: ${payload.remaining} of ${payload.total}`);
      } else if (type === "redline:reviewComplete") {
        // Fired when all changes are resolved or Finish Review is clicked
        console.log("Review complete! Final resolved HTML:", payload.resolvedHtml);
        console.log("Accepted changes:", payload.accepted);
        console.log("Rejected changes:", payload.rejected);
      }
    });

    Host applications can also programmatically resolve changes and manage viewer layout:

    // Start review mode
    iframe.contentWindow.postMessage({ type: "redline:startReview" }, "https://redline.bookcicle.com");
    
    // Accept or reject a specific change ID
    iframe.contentWindow.postMessage({ type: "redline:acceptChange", changeId: "chg-1" }, "*");
    iframe.contentWindow.postMessage({ type: "redline:rejectChange", changeId: "chg-2" }, "*");
    
    // Bulk resolve remaining changes
    iframe.contentWindow.postMessage({ type: "redline:acceptAll" }, "*");
    iframe.contentWindow.postMessage({ type: "redline:rejectAll" }, "*");
    
    // Query live review state
    iframe.contentWindow.postMessage({ type: "redline:requestState" }, "*");
    
    // Change viewer appearance
    iframe.contentWindow.postMessage({ type: "redline:setView", view: "split" }, "*");
    iframe.contentWindow.postMessage({ type: "redline:setTheme", theme: "dark" }, "*");
    iframe.contentWindow.postMessage({ type: "redline:setCollapse", collapsed: false }, "*");

    Drop-in Redline Embed SDK (/scripts/v1/redline.js)

    New subscriber-created private viewer links allow guest browser review without a reviewer account. The service supplies the review entitlement after validating the viewer link.

    Review choices stay in the browser. The completion callback provides resolved HTML for your application to save or process. It does not save a Redline draft or change Word downloads or page previews.

    Rather than writing raw <iframe> tags and manual postMessage listeners, include Redline's lightweight SDK script:

    <script src="https://redline.bookcicle.com/scripts/v1/redline.js"></script>
    <div id="redline-mount" style="min-height: 560px;"></div>
    
    <script>
      const viewer = Redline.embed({
        container: "#redline-mount",
        comparisonId: "cmp_demo_marketing",
        review: true,            // Enable interactive track changes review
        theme: "system",         // "system" | "light" | "dark"
        view: "unified",         // "unified" | "split"
        onChangeResolved: (evt) => {
          console.log(`Change ${evt.changeId} ${evt.action}ed (${evt.remaining} remaining)`);
        },
        onComplete: (evt) => {
          console.log("Final approved document HTML:", evt.resolvedHtml);
          // Persist or commit the approved document to your database
        }
      });
    
      // Programmatic controls:
      // viewer.accept("chg-1");
      // viewer.reject("chg-2");
      // viewer.acceptAll();
      // viewer.setTheme("dark");
      // viewer.destroy();
    </script>

    Hosted Embed Availability & Expiration (Adjustable TTL)

    Pass "hosted_viewer" in the output array to receive a secure embed token and hosted comparison URL. Hosted viewer tokens and stored comparison files are intentionally ephemeral, designed for interactive diff review, approval gates, and PR previews. You can customize the availability window using the hostedViewerTtl parameter:

    Hosted Embed Availability & Lifecycle Limits
    PropertySpecificationDetails
    token_ttl24h default (up to 72h)The signed embed token (cmp_tok_<timestamp>_<signature>) expires 24 hours after issuance by default, or after your selected TTL. Requests beyond this duration return token_expired.
    creator_ttl24h, 32h optionsCreator accounts can configure hostedViewerTtl to "24h" (default) or "32h".
    creator_pro_ttl24h, 32h, 48h, 72h optionsCreator Pro accounts can configure hostedViewerTtl to "24h" (default), "32h", "48h", or "72h" for extended multi-day review workflows.
    storage_lifecycleMatches token TTLStored HTML diffs and JSON changes remain accessible for the duration of the token TTL, scheduled for automated expiration cleanup thereafter.
    expiration_uiInline expired stateExpired comparison links return HTTP 404 and present a clear notice: Hosted viewer tokens expire after the configured TTL. Stored comparisons are scheduled to expire after the retention period.
    clock_skew60 seconds toleranceTokens timestamped more than 60 seconds into the future are rejected (token_issued_in_future) to prevent forged timestamps.
    demo_comparisonsPermanent / No expirationPublic sample comparisons (demo, sample, cmp_demo*) bypass token verification and never expire, useful for dev testing.

    Requesting a Hosted Comparison with Custom TTL

    Pass output: ["html", "hosted_viewer"] and optional hostedViewerTtl (e.g. "32h" for Creator, or up to "72h" for Creator Pro):

    // Request a hosted comparison with extended 48-hour availability (Creator Pro)
    const response = await fetch("https://api.bookcicle.com/v1/redline/html", {
      method: "POST",
      headers: {
        "Authorization": `Bearer ${process.env.REDLINE_API_KEY}`,
        "Content-Type": "application/json"
      },
      body: JSON.stringify({
        original: originalHtml,
        revised: revisedHtml,
        output: ["html", "hosted_viewer"],
        hostedViewerTtl: "48h" // "24h" (default), "32h" (Creator); "48h", "72h" (Creator Pro)
      })
    });
    
    const data = await response.json();
    // data returns:
    // - data.comparisonId: "cmp_a1b2c3d4e5f6..."
    // - data.viewerToken:  "cmp_tok_1740000000_abc123..." (HMAC-SHA256, active for 48h)
    // - data.embedUrl:     "https://redline.bookcicle.com/embed/cmp_...?token=cmp_tok_..."
    // - data.viewerUrl:    "https://redline.bookcicle.com/view/cmp_...?token=cmp_tok_..."

    Long-Term Retention & Re-Hosting Strategies

    • Permanent Archival: If your application needs long-term or audit-ready diff retention, store the returned html fragment and structured json changes directly in your own database or object storage. Pair with Redline’s public, versioned stylesheet (https://redline.bookcicle.com/styles/v1/redline.css).
    • Re-issuing Embed Links: To generate a new 24-hour viewer link for a past comparison, simply re-post the original and revised documents or upload IDs with output: ["html", "hosted_viewer"]. Redline’s sub-100ms comparison engine generates a fresh 24-hour token instantly.

    CSS Styling Contract

    Redline HTML returns presentation-neutral markup with semantic tags. To use our default theme, link the stylesheet:

    <link rel="stylesheet" href="https://redline.bookcicle.com/styles/v1/redline.css">

    Load the returned cssUrl once in your rendering document. Document SSE uses contentDiff.cssUrl; the field is also present for JSON-only results.

    Render the HTML fragment in an isolated preview. HTML fragments do not contain a stylesheet link; hosted viewers already load it.

    The stylesheet is public and environment-specific. Viewer and artifact URLs are private; keep their returned tokens.

    Or override specific selectors:

    ins { background: #dcfce7; color: #166534; text-decoration: none; }
    del { background: #fee2e2; color: #991b1b; text-decoration: line-through; }

    Units & Quota Calculation

    Text usage is metered by UTF-8 input bytes; PDF/DOCX usage counts raw file bytes:

    units = ceil((original_bytes + revised_bytes) / 102400)

    1 unit = 100 KiB combined raw input bytes; base64 encoding overhead is not billed. Direct PDF/DOCX pairs support 750 KiB combined raw file bytes; text-format inline requests support 800 KiB serialized JSON. Larger inputs use uploads. Document comparisons remain capped at 10 MiB combined; each anonymous file is capped at 5 MiB.

    Error Codes

    CodeHTTPDescription
    export_authentication_required401 on export and job endpointsSupply a valid authenticated Bearer token to export. In a document comparison stream, this code appears in a nonfatal track_changes_failed event; the HTML result and normal completion remain available within quota.
    unauthorized401Missing or invalid authentication.
    invalid_api_key401Key does not exist or has invalid prefix.
    api_key_revoked403Key has been explicitly revoked.
    quota_exceeded402Monthly plan allowance depleted.
    rate_limited429Requests per minute limit exceeded.
    inline_limit_exceeded413JSON request > 819200 bytes. Upload inputs and send upload IDs.
    document_too_large413Document exceeds 10 MiB maximum.
    document_too_complex422DOM tag or block density guard triggered.

    Troubleshooting payload signatures: If a direct request over 1 MiB fails with an authorization or signature mismatch error, ensure the x-amz-content-sha256 header contains the lowercase hex SHA-256 digest computed over the exact UTF-8 request body bytes.

    Rate Limits

    API requests are rate-limited based on your active plan tier:

    PlanRate LimitMax Document Size
    Basic30 requests / minute800 KiB JSON
    Creator120 requests / minute5 MiB
    Creator Pro300 requests / minute10 MiB

    When exceeded, endpoints return HTTP 429 Too Many Requests. Rate-limit headers vary by endpoint; anonymous viewer and job requests can be limited before authentication errors are returned. Honor Retry-After when supplied. If absent, use bounded backoff; do not depend on every response containing x-ratelimit-limit, x-ratelimit-remaining, or x-ratelimit-reset.

    Redline Comparison Review
    Sign in for downloads
    Document Outline
    Review Mode 0 changes remaining
    Change 0 of 0
    Original
    Revised
    🎉
    All changes reviewed!
    All change decisions recorded. Finish review to export your resolved document.
    ID Type Section / Page Diff Summary Action
    ⚡
    Total Changes 0 0 rep • 0 ins • 0 del
    📝
    Net Word Delta 0 0 orig → 0 rev
    📊
    Change Density 0% 0 unchanged blocks
    📑
    Text Sections 0 Sections 0 delivery chunks
    ✦ Executive Summary
    Automated change review

    AI summary will be generated for this comparison. Document and change navigation remain immediately accessible while summary is processing.

    Section Change Distribution

    Section Title PDF Page Range Chunks Changes Action
    Creator Plan

    Interactive Track Changes Review

    Interactive track changes review, accept/reject resolution, live progress events, and drop-in SDK integration are available on the Creator and Creator Pro plans.

    Upgrade to Creator ($19/mo)
    HOSTED EMBED INFRASTRUCTURE

    Hosted Iframe Demos
    for Modern Web Apps

    Drop authoritative document comparisons directly into customer portals, legal suites, and internal review tooling. Clean, responsive, and sandboxed iframes with a responsive viewer and structured text changes.

    Get API Key → Explore Document Reviews ↓
    • Zero Bundle Weight
    • Sandboxed CSP & HMAC
    • PostMessage Bridge
    HTML Compare Hero ↓ Full-Document DOCX ↓ Compact Chat Lane ↓ Embed Configurator ↓
    Mode:
    live-embed.example.com — Real HTML Redline Track Changes Review Demo
    View:
    Global Playground Switch: Controls all live iframe panes simultaneously
    Layout:
    Theme:
    Unchanged:
    Review:
    MULTI-PAGE ENTERPRISE REVIEW

    Full-Document Word (.docx) Redlines

    Give reviewers an expansive, distraction-free environment for legal agreements, executive proposals, and technical documentation. Featuring Mozilla-inspired collapsible outline drawer, synchronized side-by-side split diffing, and virtualized pagination across 100+ pages.

    Real Hosted Iframe 5 Pages • 15 Track Changes 760px Space
    marketing-collateral-v2.4.docx (Comparing v2.0 vs v2.4)
    View:
    AI WORKFLOWS & SIDEBARS

    Compact Chat Lane Embeds

    Deliver instant inline diffs directly inside LLM chat threads, copilot sidebars, and slide-over drawers without clunky nested scrollbars.

    • ✓
      Dynamic Height Broadcasting:

      Dispatches redline:resize postMessage events via ResizeObserver so host parents match height automatically.

    • ✓
      Compact Chrome (compact=chat):

      Strips heavy branding and optimizes line wrapping for narrow 360px–480px viewports.

    • ✓
      Seamless Dark Mode:

      Inherits host application theme or toggles on the fly without iframe reloads.

    AI Assistant Drawer — Compact Mode
    Reported Height: 380px
    DEVELOPER WORKBENCH

    Embed Configurator & Bridge Tester

    Tweak URL query parameters to generate production-ready iframe markup, or test bidirectional postMessage commands directly against the live viewer below.

    Live PostMessage Bridge Triggers

    Send instant postMessage events without iframe reloads:

    Live Callback Events Console
    Listening for window.postMessage callbacks (redline:changeResolved, redline:reviewComplete)...
    READY TO SHIP

    Integrate Redline Embeds in Minutes

    Whether you are building legal workflow tools, compliance dashboards, or AI agent sidebars, Redline delivers instant, authoritative document redlines.

    Generate Free API Key → Try Interactive Playground
    Redline by Bookcicle

    Document comparison infrastructure for modern applications.

    © 2026 Bookcicle, LLC. All rights reserved.

    API tools

    Text & HTML Playground Hosted Viewer Hosted Iframe Demos

    Product

    Playground Features Pricing Hosted Viewer Iframe Demos Document workspace

    Developers

    Documentation Code Examples API Keys Stylesheet (v1)

    Company

    Bookcicle Terms of Service Privacy Policy Cookie Policy Security Contact Support

    Preparing Desktop Sign-In…

    Please keep this tab open. Some browsers require one more click to reopen Bookcicle Desktop.

    Starting…
    This usually takes a minute to setup...
    Open Bookcicle Desktop
    If this stalls, you can close this window and retry the desktop sign-in flow.