Image Toolkit¶
The Image Toolkit provides a broad set of image endpoints for processing, format conversion, metadata extraction, favicon discovery, QR and barcode generation, and rendered Liquid templates.
It accepts either base64 image data or a public image URL for most operations, making it suitable for both backend pipelines and lightweight frontend integrations.
Base URL¶
https://image.toolkitapi.io
Quick Start¶
Resize an image in one call:
curl -X POST "https://image.toolkitapi.io/v1/image/resize" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/photo.jpg", "width": 800, "format": "webp"}'
import requests
r = requests.post(
"https://image.toolkitapi.io/v1/image/resize",
headers={"X-API-Key": "YOUR_KEY"},
json={"url": "https://example.com/photo.jpg", "width": 800, "format": "webp"},
)
print(f"Resized to {r.json()['width']}x{r.json()['height']}")
const r = await fetch("https://image.toolkitapi.io/v1/image/resize", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://example.com/photo.jpg", width: 800, format: "webp" }),
});
const data = await r.json();
console.log(`Resized: ${data.width}x${data.height}`);
Browse by topic¶
Main capability areas¶
| Area | Examples |
|---|---|
| Core processing | resize, crop, rotate, flip, compress, trim, pad |
| Filters and adjustments | grayscale, blur, sharpen, sepia, brightness, contrast, saturation |
| Generation | placeholders, QR codes, barcodes, watermarks |
| Extraction | EXIF metadata, dominant colours, favicons |
| Conversion | raster and vector format conversion via JSON or file download |
| Rendering | generate branded images from Liquid templates |
Key live endpoints¶
| Endpoint | Purpose |
|---|---|
POST /v1/image/resize |
Resize an image |
POST /v1/image/remove-background |
Remove the background from a photo |
POST /v1/image/convert |
Convert between formats and return JSON |
GET /v1/image/convert |
Convert a URL image and stream a file |
POST /v1/image/from-template |
Render a Liquid template as an image |
POST /v1/image/extract/metadata |
Extract metadata and EXIF |
POST /v1/image/extract/colors |
Extract dominant colours |
GET /v1/image/favicon |
Fetch a site favicon |
Quick Python example¶
from toolkitapi import Image
with Image(api_key="tk_...") as image:
result = image.convert(
"png",
"webp",
url="https://toolkitapi.io/logo.png",
quality=85,
)
print(result["content_type"])
Tip
For most endpoints, use either image or url, but not both in the same request.