Skip to content

Crop an image

POST
/v1/process/crop

Crop a rectangular region from an image. Specify the top-left corner (x, y) and dimensions (width, height) in pixels.

This is a free operation — no credits charged.

object
height
required

Height of the crop area (pixels). Must be positive.

integer
input_image_url
required

HTTPS URL of the image to crop.

string
width
required

Width of the crop area (pixels). Must be positive.

integer
x
required

X coordinate of the top-left corner of the crop area (pixels).

integer
y
required

Y coordinate of the top-left corner of the crop area (pixels).

integer

OK

object
content_type

MIME type of the output image.

string
expires_at

ISO 8601 expiry time of the signed URL.

string
image_url

Signed URL of the processed image. Expires in 1 hour.

string
operation

Processing operation performed.

string

Bad Request

object
details
error
string
message
string
request_id
string

Unauthorized

object
details
error
string
message
string
request_id
string

Payment Required

object
details
error
string
message
string
request_id
string

Forbidden

object
details
error
string
message
string
request_id
string

Not Found

object
details
error
string
message
string
request_id
string

Conflict

object
details
error
string
message
string
request_id
string

Unprocessable Entity

object
details
error
string
message
string
request_id
string

Too Many Requests

object
details
error
string
message
string
request_id
string

Unavailable For Legal Reasons

object
details
error
string
message
string
request_id
string

Internal Server Error

object
details
error
string
message
string
request_id
string

Bad Gateway

object
details
error
string
message
string
request_id
string

Service Unavailable

object
details
error
string
message
string
request_id
string