Check if a document is signed
A signed check, in this API, means a visual signature mark was found. Call the detector, read the count, and send empty or low-confidence results to a person. It does not tell you who signed.
A new account starts with 10 detection credits. The playground asks you to sign in, then calls the same API.
The decision, and the limit
People searching for this usually want a yes or no before a contract, application, or loan packet moves forward. The honest output of this API is narrower than that question:
- Zero detections: no visual mark was returned.
- One or more detections: a box and a confidence score for each mark.
- Not included: the signer's name, a match against a signature on file, or proof that a certificate is valid.
That is still enough to stop obviously unsigned scans. It is not enough to skip review on a document where the wrong person might have signed, or where a mark might be a stamp or a logo. Keep a reviewer for anything you would not want a model to settle alone.
A small status function
The request is the image API. Branch on HTTP status first, then on result.count.
async function checkSigned(imageUrl, apiKey) {
const response = await fetch("https://signature-detector.com/api/detect", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": apiKey,
},
body: JSON.stringify({ imageUrl }),
});
const data = await response.json();
if (!response.ok) {
throw new Error(data.error || `Detection failed (${response.status})`);
}
// 0.5 is an example cutoff for a review queue, not an API parameter.
// The server already omitted anything below 0.1.
const confident = data.result.detections.filter(
(detection) => detection.confidence >= 0.5
);
if (data.result.count === 0) {
return { status: "no-mark-detected", review: true, data };
}
if (confident.length === 0) {
return { status: "low-confidence", review: true, data };
}
return { status: "mark-detected", review: false, data };
}Store detectionId with the application or contract id. When someone asks why a file was flagged, you can show the boxes instead of a bare boolean. Cropping those boxes for the reviewer is covered in extracting signature crops.
PDFs and multi-page files
A single page image uses imageUrl or imageBase64. A PDF uses pdfUrl or pdfBase64. pages, count, and creditsUsed are top-level fields, and signed is true only when count is greater than zero. A file is a poor "fully signed" candidate when any required page has count: 0. Which pages are required is your checklist, not a field in the response. See PDF signature detection and automating signed-contract checks.
False confidence
The sample score in the API docs is 0.192, just above the fixed cutoff of 0.1. A mark that low is a weak signal. Sending it straight to "signed" will pass noise. The sample function above files those under low-confidence so a person sees them. On an image you can also send threshold from 0 to 1 and the server will omit lower scores. The default is 0.1. PDF pages always use 0.1. A value outside 0 to 1 is HTTP 400.
FAQ
Does a count above zero mean the document is legally signed?
No. result.count is the number of visual marks returned at or above the server threshold of 0.1. It is not a determination under e-sign law, and it is not a check that a required person signed a required line.
What should I do when count is zero?
Treat it as no mark detected, and route the file to review or back to the sender. A blank page, a mark drawn outside the image, a very faint mark, or a cryptographic PDF signature with no visible ink can all produce a count of zero.
Can I raise the confidence threshold in the request?
On an image, yes. Send threshold as a number from 0 to 1. The default is 0.1, and the response reports it as result.confidenceThreshold. The 0.5 cutoff in the sample on this page is a client-side split for a review queue, not a value the service measured as optimal. PDF detection always uses 0.1.
Will this catch a digital PDF signature?
Only if that signature also appears as a visible mark in the image or rendered page. The API does not read PDF signature dictionaries or certificates. Use the PDF page for multi-page files, and still treat the result as a visual check.
How many credits does a check use?
One new image detection uses 1 credit, which is $0.0001. Repeating the same image bytes returns cached: true and does not spend a credit. A new account starts with 10 credits. Credits do not expire.
Related reading
- Signature detection API
Request fields, response boxes, credits, and the errors the endpoint actually returns.
- PDF signature detection
Send pdfUrl or pdfBase64. pages, count, and creditsUsed are top-level.
- Contracts
Record where signature marks sit on an agreement, then crop them for a human.
- Automating signed-contract checks
A review queue for visual signature marks, separate from digital certificates.
- KYC intake
Flag application images that have no signature mark before a reviewer opens them.
- Lending packets
Check each required page of a loan packet and count the credits before you run it.
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.
