curl -X POST \
  <BASE_URL>/smart-crop-image \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d '{
    "image_url": "https://example.com/image.jpg",
    "ratio": "4:5"
}'

{
	"cropped_image_url": "https://example.com/cropped-image.jpeg"
}

Body

This endpoint will crop images intuitively and return the cropped image.

image_url
string

This is the image url of the image you want to crop.

ratio
Integer

This is the ratio of the cropped image. The value could be 9:16 for long vertical, 16:9 for horizontal, 1:1 for square, 4:5 for vertical social media, etc.

Response

cropped_image_url
string

This is the url of the cropped image.

curl -X POST \
  <BASE_URL>/smart-crop-image \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d '{
    "image_url": "https://example.com/image.jpg",
    "ratio": "4:5"
}'

{
	"cropped_image_url": "https://example.com/cropped-image.jpeg"
}