xtract.bot

Image detect document

Try it interactively →
POST /api/image-detect-document

Detect a paper document in a photo (the four corner points) and return a rectified, top-down PNG. Useful as a building block for scan-from-photo apps.

Looks for a rectangular document — a piece of paper, a business card, a receipt — in an arbitrary photo, finds its four corners, and warps the image so the document is straight-on. Returns the rectified PNG plus the four detected corner coordinates (so you can render an overlay on the original photo if you want). Used as a building block for "scan with camera" workflows.

Inputs

NameTypeDefaultDescription
image*fileJPEG, PNG, WebP, or BMP photograph containing a document.

Response

Modes: json. Cache: yes (24h TTL).