Crop.photo
  1. Crop.photo API
Crop.photo
  • Crop.photo API
    • Introduction
    • Authentication
    • FAQs
    • Examples
    • Interactive API Testing
    • Auto Resize & Align
      POST
    • Body Aware Crop
      POST
    • Unrecognizable Crop
      POST
    • Remove Background
      POST
    • Create Banner Job
      POST
    • AI Lifestyle Crop
      POST
    • Banners Job Status
      POST
  1. Crop.photo API

Body Aware Crop

POST
/crop/body-aware-crop
The Body-Aware Crop feature in Crop.photo API enables precise and versatile cropping based on various body markers, catering to diverse use cases and enhancing image customization. These markers facilitate targeted cropping to specific body areas, allowing users to focus on particular features or aspects of the subject in the image.
Supported Cropping Markers:
1.
FACE: Focuses strictly on the face area.
2.
HEAD: Includes the entire head.
3.
HEAD_TO_KNEES: Crops from the head down to the knees.
4.
HEAD_TO_ELBOWS: Crops from the head to the elbows.
5.
HIPS: Focuses around the hip and waist area.
6.
HEAD_TO_SHOULDER: Includes the head and shoulder area.
7.
PERSON: Captures the entire body.
8.
MID_HALF: Focuses on the middle half of the body. Typically from upper waist to thighs.
9.
UPPER_HALF: Crops the upper half of the body from head to waist.
10.
LOWER_HALF: Targets the lower half of the body from waist to feet.
Each marker provides specific framing options, allowing users to tailor their cropping preferences for various applications such as fashion, identification, or social media usage. Whether it's highlighting facial features for a portrait or showcasing full-body attire for fashion purposes, the Body-Aware Crop feature offers flexibility and precision in image cropping.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
    "image_url": "https://acme.s3.aws.com/image.png",
    "background": "white",
    "output_format": "auto",
    "output_dimension": "1080x1080",
    "response_type": "stream",
    "margins": {
        "top": 0,
        "bottom": 0,
        "left": 0,
        "right": 0
    },
    "center_around_face": "true",
    "crop_marker": "person"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://us1-api.crop.photo/v1/crop/body-aware-crop' \
--header 'Content-Type: application/json' \
--data-raw '{
    "image_url": "https://acme.s3.aws.com/image.png",
    "background": "white",
    "output_format": "auto",
    "output_dimension": "1080x1080",
    "response_type": "stream",
    "margins": {
        "top": 0,
        "bottom": 0,
        "left": 0,
        "right": 0
    },
    "center_around_face": "true",
    "crop_marker": "person"
}'

Responses

🟢200Success
application/octet-stream
Body

🟠401Unauthorized
🟠400Invalid Input | Crop.photo
🟢200Image Crop Response JSON
🟢200Image Crop Response JSON
Modified at 2024-04-26 16:38:13
Previous
Auto Resize & Align
Next
Unrecognizable Crop
Built with