Home / APIs / Image Toolkit

Image Toolkit API

Resize, convert, compress & crop images (JPEG/PNG/WebP/AVIF) from a URL or base64 — fast, no storage.

Get it on RapidAPI ↗

Image Toolkit resizes, converts, compresses, and crops images over a simple JSON API — powered by libvips (sharp). Send an image as a URL or base64 and get the processed result back as raw bytes or base64. Stateless and fast; nothing is stored.

Convert between JPEG, PNG, WebP, and AVIF with quality control, generate thumbnails, shrink uploads, or crop regions. SSRF-hardened URL fetching and strict size limits keep it safe and cheap to run. Great for user uploads, thumbnails, and on-the-fly optimization.

Endpoints

MethodPathDescription
POST/image/resizeResize with fit modes (cover/contain/fill/inside/outside)
POST/image/convertConvert between JPEG / PNG / WebP / AVIF
POST/image/compressShrink file size at a target quality
POST/image/cropExtract a rectangular region
POST/image/infoFormat, dimensions, channels, alpha, orientation

Quick start

cURL (via RapidAPI)
curl --request POST \
  --url 'https://image-toolkit2.p.rapidapi.com/resize' \
  --header 'X-RapidAPI-Key: YOUR_KEY' \
  --header 'X-RapidAPI-Host: image-toolkit2.p.rapidapi.com' \
  --header 'content-type: application/json' \
  --data '{ "url": "https://picsum.photos/800", "width": 400, "format": "webp" }'
JavaScript (fetch)
const res = await fetch('https://image-toolkit2.p.rapidapi.com/resize', {
  method: 'POST',
  headers: {
    'X-RapidAPI-Key': 'YOUR_KEY',
    'X-RapidAPI-Host': 'image-toolkit2.p.rapidapi.com',
    'content-type': 'application/json'
  },
  body: JSON.stringify({ "url": "https://picsum.photos/800", "width": 400, "format": "webp" })
});
const data = await res.json();
Example response
{
  "format": "webp",
  "width": 400,
  "height": 300,
  "bytes": 18234,
  "base64": "UklGRi4AAABXRUJQ..."
}

Pricing

Subscribe on RapidAPI. Start free; upgrade as you scale.

Basic
Free
1,000 requests / mo
Pro
$5 / mo
100,000 requests / mo
Ultra
$20 / mo
1,000,000 requests / mo
Mega
$50 / mo
2,000,000 requests / mo

Frequently asked questions

How do I send an image?

Provide a public image URL (fetched through an SSRF-hardened proxy) or a base64 string. By default you get image bytes back; set output=base64 for JSON.

Which formats are supported?

Input: anything libvips reads (JPEG, PNG, WebP, AVIF, GIF, TIFF, SVG, ...). Output: JPEG, PNG, WebP, or AVIF with quality control.

Are images stored?

No — processing is fully in-memory and stateless; nothing is retained.

Ready to build with Image Toolkit?

Grab your key on RapidAPI and start on the free tier.

Get it on RapidAPI ↗