HomeGuides › Image Toolkit API: Resize, Convert, and Compress

Image Toolkit API: Resize, Convert, and Compress

Running sharp or ImageMagick in production means native binaries, memory limits, and a service to babysit. Offload it to one API call.

Point the API at an image URL (or upload one), set the dimensions and format, and get back an optimized image.

Resize and convert to WebP

curl
curl -X POST "https://image-toolkit2.p.rapidapi.com/image/resize" \
  -H "X-RapidAPI-Key: YOUR_KEY" \
  -H "X-RapidAPI-Host: image-toolkit2.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://picsum.photos/800","width":400,"format":"webp"}'

Compress, crop, and inspect

Beyond resize, the listing compresses to a target quality, crops to a region, converts between formats, and returns image metadata (dimensions, format, size). Input dimensions and file size are capped to keep requests fast and safe.

Why offload it

No native dependencies in your build, no memory spikes from large images on your own boxes, and consistent output across environments. Generate responsive WebP variants at request time or in a build step.

Run it in production

Image Toolkit has a permanent free tier — 1,000 requests a month, no credit card. Paid plans start at $5/month for 100,000 requests.

Get a free API key on RapidAPI ↗

Full endpoint reference →

FAQ

Can I send an image directly instead of a URL?

Yes. The endpoints accept either an image URL or an uploaded file.

Which output formats are supported?

Common web formats including WebP, PNG, and JPEG; set the format field.

Are there size limits?

Yes. Input dimensions and file size are capped so requests stay fast and the service stays safe.