wowmachine
smart_toy

crop-image

wowmachine/crop-image

Crop an image by pixel coordinates, percentage coordinates, or a uniform margin (in pixels or as a fraction). Pick one mode per call.

Input

URL of the image to crop. Use exactly one crop mode per call.

add_photo_alternate

Left offset in pixels. Combine with y, width and height for pixel mode.

Top offset in pixels. Combine with x, width and height for pixel mode.

Crop width in pixels. Combine with x, y and height for pixel mode.

Crop height in pixels. Combine with x, y and width for pixel mode.

Left offset as a fraction (0.0–1.0). Combine all four _pct fields for percentage mode.

min: 0max: 1

Top offset as a fraction (0.0–1.0). Combine all four _pct fields for percentage mode.

min: 0max: 1

Crop width as a fraction (0.0–1.0). Combine all four _pct fields for percentage mode.

min: 0max: 1

Crop height as a fraction (0.0–1.0). Combine all four _pct fields for percentage mode.

min: 0max: 1

Remove this many pixels from every side (uniform margin mode).

Remove this fraction (0.0–0.5) from every side (uniform percentage margin mode).

min: 0max: 0.5

Output

image

Run the model to see output here.

Pricing

**1 credit per call.** Flat per call — the price does not depend on input size, output size, or parameters. *Wowmachine utilities are deterministic, non-AI media operations (ffmpeg, Pillow, yt-dlp, O...

Features

## Crop Image Flexible image cropping with four modes: pixel coordinates, percentage coordinates, uniform pixel margin, or uniform percentage margin. Use exactly one mode per call. ## What it does ...

API Examples

curl -X POST \
  /api/v1/model/wowmachine/crop-image \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {}
}'

Tags