Skip to content
Browse all functions

Compare PDFs (AI + Text Diff)

files/comparepdfs

comparepdfs (Compare PDFs (AI + Text Diff)) is a 1001fx API function in the group Files & PDF: POST https://api.1001fx.com/files/comparepdfs, 1 credit per item. It works as a ready-made module in Make or as a plain HTTP call.

Part of the app PDF Compare – See every change between two PDF versions, explained and rated by AI.

Compares two versions of a PDF: a word-by-word diff (line breaks, spacing and hyphenation are ignored) with every change, its context and page, and an AI explanation of what changed and how important it is (high/medium/low), in the language of the documents. Each PDF is stored encrypted for 2 days under its SHA-256 hash, together with the extracted text: pass file1Hash/file2Hash instead of the file to compare it again without upload and without new OCR. Scanned pages without a text layer are read by OCR (ocr auto). Credits: 1 per started 5 pages of both PDFs together, plus 6 per OCR page, plus 4 per started 1,000 AI tokens (twice that with gpt-6.1-terra).

  • This service is provided by an external service provider: Microsoft Azure OpenAI, Mistral. The data of the call is sent to the provider. More about service providers

Try it in the 1001fx app

Run comparepdfs in your browser with your API key – fill the form, click Run and get the answer or the file.

comparepdfs in the 1001fx app: the form with example values
Compare PDFs (AI + Text Diff) in the 1001fx app

Endpoint

POSThttps://api.1001fx.com/files/comparepdfs
Header
X-API-KEY: YOURSECRETAPIKEY How to
Content type
multipart/form-data

Parameters

  • file1fileoptional

    The old version (PDF). Either file1 or file1Url.

  • file1Urlstringoptional

    Public URL of the old version (PDF). Either file1 or file1Url.

    Example:
    https://api.1001fx.com/testdata/contract-v1.pdf
  • file1Hashstringoptional

    SHA-256 hash of a PDF compared in the last 2 days (file1.hash of that answer). Compares it again without upload and without new OCR. Either file1, file1Url or file1Hash.

  • file2fileoptional

    The new version (PDF). Either file2 or file2Url.

  • file2Urlstringoptional

    Public URL of the new version (PDF). Either file2 or file2Url.

    Example:
    https://api.1001fx.com/testdata/contract-v2.pdf
  • file2Hashstringoptional

    SHA-256 hash of a PDF compared in the last 2 days (file2.hash of that answer). Compares it again without upload and without new OCR. Either file2, file2Url or file2Hash.

  • aibooleanoptional

    Explains and rates the changes with AI (default true). false: text diff only (1 credit per 5 pages).

    Default:
    true
  • instructionsstringoptional

    What the AI should pay attention to, e.g. "Focus on deadlines, prices and liability" or "Answer in English".

    Example:
    Focus on deadlines, prices and liability.
  • modelenumoptional

    gpt-6-luna (default) or gpt-6.1-terra for long or difficult documents (twice the AI credits).

    Values:
    gpt-6-luna
    gpt-6.1-terra
    Default:
    gpt-6-luna
  • ocrenumoptional

    auto (default): OCR only for pages without text layer (scans); always: OCR for every page (bad text layer); never: text layer only. 6 credits per OCR page, at most 50 pages per PDF; stored OCR pages are reused for free.

    Values:
    auto
    always
    never
    Default:
    auto
  • includeDiffbooleanoptional

    Adds the full word diff (all text, marked equal/removed/added) as diff, e.g. to show it side by side.

    Default:
    false

Examples

Compare two contract versions

Text diff and AI explanation of two PDF versions

Input

Expects multipart/form-data or a json body
{
  "file1Url": "https://api.1001fx.com/testdata/contract-v1.pdf",
  "file2Url": "https://api.1001fx.com/testdata/contract-v2.pdf",
  "instructions": "Focus on deadlines, prices and liability."
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/files/comparepdfs' \
  -H 'X-API-KEY: YOURSECRETAPIKEY'

Text diff only

Word diff without AI (1 credit per 5 pages)

Input

Expects multipart/form-data or a json body
{
  "file1Url": "https://api.1001fx.com/testdata/contract-v1.pdf",
  "file2Url": "https://api.1001fx.com/testdata/contract-v2.pdf",
  "ai": false
}

Output · HTTP 200

Response
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/files/comparepdfs' \
  -H 'X-API-KEY: YOURSECRETAPIKEY'

Use cases

Try comparepdfs now

Run it in your browser or create a free account and get 100 credits every month.

Changelog

  • 1.0.003.11.2026created
Ask 1001fx