Resize, crop, and convert images between formats with a single POST request. Pass an image URL or upload directly. No image processing libraries to install.
| Param | Required | Description |
|---|---|---|
url / image | Required | URL of the image or base64 string (or multipart file upload) |
width | Optional | Target width in pixels (max 4096) |
height | Optional | Target height in pixels (max 4096) |
format | Optional | Output format: png, jpeg, webp, avif (default png) |
quality | Optional | Quality 1-100 for jpeg/webp/avif (default 80) |
fit | Optional | Resize fit: cover, contain, fill, inside, outside (default cover) |
curl -X POST "https://api-snap.com/api/resize" \
-H "Authorization: Bearer snp_your_key" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/photo.jpg","width":400,"format":"webp"}' \
-o resized.webpconst res = await fetch("https://api-snap.com/api/resize", {
method: "POST",
headers: {
Authorization: "Bearer snp_your_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://example.com/photo.jpg",
width: 800,
height: 600,
format: "webp",
quality: 85,
}),
});
const blob = await res.blob();import requests
r = requests.post(
"https://api-snap.com/api/resize",
headers={"Authorization": "Bearer snp_your_key"},
json={"url": "https://example.com/photo.jpg", "width": 400, "format": "avif"},
)
with open("thumb.avif", "wb") as f:
f.write(r.content)Create consistent thumbnails from user uploads for galleries and profiles
Convert PNG/JPEG to WebP or AVIF for faster page loads and bandwidth savings
Generate multiple sizes from a single upload for srcset and responsive layouts
Resize images to platform-specific dimensions for Open Graph, Twitter cards, etc.
Process product images into uniform sizes across your storefront
Automate image processing in CI/CD or CMS workflows without local dependencies
No Sharp, no ImageMagick, no dependencies. Just an API call.
Get Your Free API Key