LogoSignature Detection API

Signature detection for contracts

Record whether a contract page contains a visual signature mark, and where the box sits, before the agreement is filed. The API does not decide that the contract is executed.

Open the playground

A new account starts with 10 detection credits. The playground asks you to sign in, then calls the same API.

Presence first

Contract operations teams lose time on files that were attached but never signed. A detection count answers that narrow question. It does not replace legal review, and it does not know your signature-block template. Pair it with a checklist of pages that must contain a mark.

The sample uses the PDF body. Field names and the page grouping are specified on PDF signature detection.

Python
import base64
import requests

def detect_contract(path: str, api_key: str) -> dict:
    with open(path, "rb") as handle:
        pdf_base64 = base64.b64encode(handle.read()).decode("ascii")

    response = requests.post(
        "https://signature-detector.com/api/detect",
        headers={
            "Content-Type": "application/json",
            "x-api-key": api_key,
        },
        json={"pdfBase64": pdf_base64},
        timeout=120,
    )
    response.raise_for_status()
    data = response.json()

    return {
        "detection_id": data.get("detectionId"),
        "signed": data["signed"],
        "total_marks": data["count"],
        "credits_used": data["creditsUsed"],
        "pages": [
            {
                "page": page["page"],
                "count": page["count"],
                "boxes": [mark["bbox"] for mark in page["detections"]],
            }
            for page in data["pages"]
        ],
    }

Two boxes is not two parties

A signature page often has a company block and a counterparty block. You might sort boxes by y1 and assume the lower one is the customer. That is a layout guess. Write it down as a guess, show both crops to the clerk who files the contract, and correct it when the template changes. Cropping is local. The request does not return image bytes. See crop signatures from bounding boxes.

Workflow shape

Credits

Sending the same PDF bytes again returns cached: true and creditsUsed: 0. The balance does not change. Re-encoding the file changes the hash, so that copy is charged at 1 credit per page.

FAQ

Will this tell vendor signature from customer signature?

No. Every detection uses the same class name, signature. Which party a box belongs to is something you infer from position, such as the lower of two blocks on a signature page, and then confirm by eye. The API does not take party names.

What about DocuSign or a PAdES certificate?

A platform certificate can make a PDF signed with no ink on the page, and a scanned contract can show ink with no certificate. This API looks for visible marks. It does not validate a digital signature. An empty detection list does not mean the PDF signature panel is empty.

Is a detected mark enough to file the contract as executed?

No. You still need your own rules: all required parties present, dates filled, no missing pages. Use the detector to catch files that have no mark at all, and to attach boxes for the person who checks the rest.

How do I send the contract?

Send pdfUrl or pdfBase64 to POST https://signature-detector.com/api/detect. Results are grouped by 1-based page. A single exported signature page can instead use imageUrl or imageBase64.

What does it cost to scan a contract archive?

A PDF spends 1 credit per page, and an image spends 1 credit, when the file is not cached. 50,000 pages is 50,000 credits, which is $5. A repeated identical PDF returns creditsUsed 0. Credits do not expire, so a backlog can be purchased once. The minimum purchase is $1. New accounts start with 10 credits. A balance below the page count is HTTP 402 and the file is not charged.

Related reading

Try it on your own file

Upload an image in the playground, or create an API key from the dashboard after signup. Read the API docs for the request fields.

Open the playground