Logo
Comparison

Format Comparison

View Docs

API Reference

POST
/api/agent/format_comparison

Authorization

ApiKeyAuth
access-key<token>

Your unique access-key generated from the platform UI

In: header

Request Body

application/json

doc_1_process_id*string

First document ID to compare (obtained from Upload or List Documents APIs). Only documents with status 'processed' can be used.

doc_2_process_id*string

Second document ID to compare (obtained from Upload or List Documents APIs). Only documents with status 'processed' can be used.

checkpoints_to_compare*

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.k-v.ai/api/agent/format_comparison" \  -H "Content-Type: application/json" \  -d '{    "doc_1_process_id": "your_doc_id_1",    "doc_2_process_id": "your_doc_id_2",    "checkpoints_to_compare": {      "page_margins": true,      "links": true,      "font_sizes": false    }  }'
{
  "value": {
    "data": [
      {
        "file_name": "john_smith_story.pdf",
        "result": {
          "page_margins": {
            "1": {
              "top": 1.07,
              "bottom": 3.95,
              "left": 1.08,
              "right": 1.08
            },
            "2": {
              "top": 1.07,
              "bottom": 3.92,
              "left": 1.08,
              "right": 1.08
            },
            "3": {
              "top": 1.07,
              "bottom": 2.12,
              "left": 1.08,
              "right": 1.08
            }
          },
          "links": []
        },
        "doc_hash": "bca03f7db29b5f22c293f6cff2bf378a"
      },
      {
        "file_name": "Settlement Agreement (1).pdf",
        "result": {
          "page_margins": {
            "1": {
              "top": 1.15,
              "bottom": 1.21,
              "left": 1.25,
              "right": 1.23
            },
            "2": {
              "top": 0.98,
              "bottom": 1.04,
              "left": 1.25,
              "right": 1.21
            },
            "3": {
              "top": 0.99,
              "bottom": 4.19,
              "left": 1.25,
              "right": 1.16
            }
          },
          "links": []
        },
        "doc_hash": "264dfa262b748d15ccbeaada89430c68"
      }
    ],
    "message": "Format compared successfully"
  }
}
{
  "value": {
    "data": {},
    "message": "Invalid docs selected"
  }
}
{
  "value": {
    "data": {},
    "message": "Invalid or missing access key"
  }
}
{
  "value": {
    "data": {},
    "message": "Something went wrong"
  }
}