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
| Method | Path | Description |
|---|---|---|
| POST | /image/resize | Resize with fit modes (cover/contain/fill/inside/outside) |
| POST | /image/convert | Convert between JPEG / PNG / WebP / AVIF |
| POST | /image/compress | Shrink file size at a target quality |
| POST | /image/crop | Extract a rectangular region |
| POST | /image/info | Format, dimensions, channels, alpha, orientation |
Quick start
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" }'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();{
"format": "webp",
"width": 400,
"height": 300,
"bytes": 18234,
"base64": "UklGRi4AAABXRUJQ..."
}Pricing
Subscribe on RapidAPI. Start free; upgrade as you scale.
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 ↗