Authorization: Bearer ********************
.png
, .jpg
, .jpeg
and .webp
, etc. Ensure the URL points directly to a compatible image file.1
.3000
.1
.3000
.1
.3000
.1
.3000
.px
for pixels, %
for percentage of the subject's size.match_to_original
- Keep original image dimension.trim_to_subject
- Keep subject dimensions with all the given margins around it.WidthxHeight
- Resize the image to given width and height. Like 1600x1600stream
- The response is streamed back in the same request. This option is optimal for immediate processing or display of the data without the need for a separate download step.url
- The response will be provided as a signed S3 URL. This method will be supported in the future and is ideal for cases where the response needs to be accessed multiple times or shared.{
"image_url": "https://loremflickr.com/640/480/nightlife",
"minimum_margins": {
"top": 2021,
"bottom": 448,
"left": 789,
"right": 414,
"unit": "px"
},
"output_format": "webp",
"output_dimension": "81x5",
"response_type": "stream",
"ai_model": "SCENE_V1",
"analysis_hints": [
"sit"
]
}
curl --location --request POST 'http://localhost:8081/v1/crop/lifestyle' \
--header 'Content-Type: application/json' \
--data-raw '{
"image_url": "https://loremflickr.com/640/480/nightlife",
"minimum_margins": {
"top": 2021,
"bottom": 448,
"left": 789,
"right": 414,
"unit": "px"
},
"output_format": "webp",
"output_dimension": "81x5",
"response_type": "stream",
"ai_model": "SCENE_V1",
"analysis_hints": [
"sit"
]
}'