Image Editing
Crop and reframe images with precise pixel or aspect-ratio controls.
POST
/api/v1/image/editRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| operation | string | Yes | "imageCrop" |
| mediaIds | string[] | Yes | 1 media ID of the image to crop |
imageCrop
Crop an image by specifying pixel coordinates, an aspect ratio, or both.
| Parameter | Type | Required | Description |
|---|---|---|---|
| cropPixelX | integer | No | X coordinate of the crop origin |
| cropPixelY | integer | No | Y coordinate of the crop origin |
| cropPixelWidth | integer | No | Width of the crop area in pixels |
| cropPixelHeight | integer | No | Height of the crop area in pixels |
| aspectRatio | string | No | 16:9, 9:16, 1:1, 4:5, 21:9, 4:3, 3:2, free (default free) |
Response
{
"editorJobId": "ej_..."
}Example
POST
/api/v1/image/edit{
"operation": "imageCrop",
"mediaIds": ["media_abc"],
"params": {
"aspectRatio": "1:1",
"cropPixelX": 100,
"cropPixelY": 50,
"cropPixelWidth": 500,
"cropPixelHeight": 500
}
}