Deskew (auto-straighten)
Try it interactively →POST /api/image-deskewAuto-deskew a scanned document. Detects the rotation angle (up to ±15°) and rotates the image so text lines are horizontal. Useful before OCR.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| image* | file | — | Input image bytes. |
| background | string | "white" | Background fill colour for rotated regions outside the original (CSS-style hex or named: white, black, transparent). |
| maxAngle | number (0…90) | 45 | Cap rotation magnitude — angles outside ±maxAngle are rejected (likely false positives). |
Response
Modes: binary, json. Cache: yes (24h TTL).