Skip to main content
All processing options are passed as query parameters appended to the request URL. Every parameter is optional — with no parameters, the API crops and dewarps the document with default settings.
Enabling every option does not necessarily improve the result. Cropping and dewarping are on by default; enhancement and orientation correction are off by default and should be enabled based on the input image.
This page explains what each parameter does and when to use it. For exact types, defaults, and an interactive playground, see the API Reference.

Common configurations

Send no parameters. The API detects the document, crops away the background, and corrects geometric distortion.

Cropping

crop_image

Whether to crop the detected document out of the image.
  • 0: Do not crop.
  • 1: Crop the detected document.

only_position

Whether to omit the processed image from the response.
  • 0: Return the processed image along with position, cropped_width, cropped_height, and angle.
  • 1: Omit the image field. The response still includes position, cropped_width, cropped_height, and angle. Use this option when you want to perform the crop on the client side.

round_image

Whether to return the cropped image with rounded corners.
  • 0: Do not round the corners.
  • 1: Return the cropped image with rounded corners.

size_and_positon

Crop the image using client-supplied dimensions and corner coordinates instead of automatic detection. Format: width,height,x1,y1,x2,y2,x3,y3,x4,y4
  • width, height: target image width and height. Set to 0 to use the default values.
  • (x1, y1): top-left corner
  • (x2, y2): top-right corner
  • (x3, y3): bottom-right corner
  • (x4, y4): bottom-left corner
This parameter name is spelled size_and_positon (without the second i) in the API. Use it exactly as shown.

Correction

Correction includes two independent operations: dewarp_image fixes geometric distortion (curvature and perspective), and correct_direction fixes the page orientation (90°/180°/270° rotation).

dewarp_image

Whether to correct geometric distortion, such as page curvature and perspective distortion.
  • 0: Do not correct distortion.
  • 1: Correct distortion.

correct_direction

Whether to correct the image orientation. The angle field is always present in the response; orientation is only detected when this option is enabled, otherwise angle is -1.
  • 0: Do not correct orientation. angle is returned as -1.
  • 1: Correct orientation and report the detected angle. Enable this for photos or scans that may be rotated.

Enhancement

enhance_mode

The image enhancement mode applied to the result.

deblur_image

Whether to apply sharpness enhancement (deblur).
  • 0: Do not enhance sharpness.
  • 1: Enhance sharpness.
deblur_image sharpens the image independently of enhance_mode. You can combine the two — for example, enhance_mode=5 with deblur_image=1.

Output

jpeg_quality

Compression quality of the cropped image. Recommended range is 65–100. Higher values produce a larger, higher-quality image.

Quickstart

Process your first image.

API Reference

Full request and response schema with an interactive playground.

Supported Files & Limits

Review supported formats and limits.

Errors

Error codes and how to resolve them.