Free Image Processing API

Resize, crop, convert, optimize, blur, sharpen, and transform images via REST. Generate QR codes and placeholder images. Powered by Sharp — no signup required.

● Free Tier 13 Endpoints 6 Formats 10 MB Max

Why Use an Image Processing API?

Every app that handles user uploads, generates thumbnails, or serves optimized images needs server-side image processing. Running your own Sharp/ImageMagick setup means managing dependencies, memory limits, and security patches. An image processing API gives you all the power via a simple REST call — resize in one request, convert to WebP in another, generate QR codes on the fly.

The Agent Image Processor is a free, open REST API built on Sharp (the fastest Node.js image library). It handles 13 operations across 6 image formats, accepts images as URLs, base64, or data URIs, and returns processed results as base64 with full metadata.

Supported Formats

JPEGPhotos
PNGLossless
WebPModern web
AVIFNext-gen
GIFAnimation
TIFFPrint

All 13 Endpoints

POST/api/resizeResize with fit modes
POST/api/convertConvert between formats
POST/api/cropCrop region from image
POST/api/rotateRotate by any angle
POST/api/blurGaussian blur
POST/api/sharpenSharpen image details
POST/api/grayscaleConvert to grayscale
POST/api/metadataExtract EXIF & dimensions
POST/api/optimizeCompress & reduce size
POST/api/qrcodeGenerate QR codes
GET/api/placeholder/:w/:hDynamic placeholder images
POST/api/compositeOverlay/watermark images
POST/api/transformMulti-step pipeline

Quick Start — Resize an Image

Resize any image by passing a URL, base64 string, or data URI. Set width, height, and fit mode (cover, contain, fill, inside, outside).

Resize to 400x300
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/resize \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://picsum.photos/800/600",
    "width": 400,
    "height": 300,
    "fit": "cover",
    "format": "webp",
    "quality": 85
  }'
Python
import requests, base64

resp = requests.post(
    "https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/resize",
    json={
        "image": "https://picsum.photos/800/600",
        "width": 400,
        "height": 300,
        "fit": "cover",
        "format": "webp"
    }
)

data = resp.json()
print(f"Size: {data['width']}x{data['height']}, {data['size']} bytes")

# Save to file
with open("thumbnail.webp", "wb") as f:
    f.write(base64.b64decode(data["image"]))
Node.js
const resp = await fetch(
  "https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/resize",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      image: "https://picsum.photos/800/600",
      width: 400,
      height: 300,
      fit: "cover",
      format: "webp"
    })
  }
);

const data = await resp.json();
console.log(`Size: ${data.width}x${data.height}, ${data.size} bytes`);

// Save to file
import { writeFileSync } from "fs";
writeFileSync("thumbnail.webp", Buffer.from(data.image, "base64"));

Response

JSON Response
{
  "image": "UklGRv4EAABXRUJQVl...",
  "format": "webp",
  "width": 400,
  "height": 300,
  "size": 12847,
  "credits_remaining": null
}

Convert Between Formats

Convert any image to JPEG, PNG, WebP, AVIF, GIF, or TIFF in a single call. Set quality for lossy formats.

Convert PNG to WebP
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/convert \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://example.com/photo.png",
    "format": "webp",
    "quality": 80
  }'

Optimize & Compress Images

Reduce file size while maintaining visual quality. The API returns the original size, optimized size, and percentage savings so you know exactly how much bandwidth you saved.

Optimize with quality 75
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/optimize \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://picsum.photos/1200/800",
    "format": "webp",
    "quality": 75
  }'
Python
import requests

resp = requests.post(
    "https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/optimize",
    json={
        "image": "https://picsum.photos/1200/800",
        "format": "webp",
        "quality": 75
    }
)

data = resp.json()
print(f"Original: {data['originalSize']} bytes")
print(f"Optimized: {data['optimizedSize']} bytes")
print(f"Savings: {data['savings']}")
Node.js
const resp = await fetch(
  "https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/optimize",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      image: "https://picsum.photos/1200/800",
      format: "webp",
      quality: 75
    })
  }
);

const { originalSize, optimizedSize, savings } = await resp.json();
console.log(`Saved ${savings} (${originalSize} → ${optimizedSize} bytes)`);

Optimization Response

JSON Response
{
  "image": "UklGRv4EAABXRUJQVl...",
  "format": "webp",
  "width": 1200,
  "height": 800,
  "originalSize": 142506,
  "optimizedSize": 38247,
  "savings": "73.2%",
  "credits_remaining": null
}

Generate QR Codes

Generate QR codes from any text or URL. Customize size, colors, margin, and output format.

Generate QR Code
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/qrcode \
  -H "Content-Type: application/json" \
  -d '{
    "text": "https://api-catalog-three.vercel.app",
    "size": 300,
    "format": "png",
    "dark": "#8b5cf6",
    "light": "#0a0a0f",
    "margin": 2
  }'

Dynamic Placeholder Images

Generate placeholder images on the fly with custom dimensions, colors, and text. Perfect for mockups and development.

Placeholder Image (no auth needed)
# Basic 400x300 placeholder
https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/placeholder/400/300

# Custom colors and text
https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/placeholder/800/400?color=1a1a2e&textColor=8b5cf6&text=Hero+Banner&format=webp

# Use directly in HTML
<img src="https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/placeholder/200/200?text=Avatar" alt="placeholder">

Multi-Step Transform Pipeline

Chain multiple operations in a single request. Instead of making separate API calls for resize + crop + grayscale, send them all at once via the /api/transform endpoint.

Multi-step pipeline
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/transform \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://picsum.photos/1200/800",
    "steps": [
      {"op": "resize", "width": 600, "height": 400, "fit": "cover"},
      {"op": "sharpen", "sigma": 1.5},
      {"op": "grayscale"}
    ],
    "outputFormat": "webp",
    "outputQuality": 85
  }'
Python
import requests

resp = requests.post(
    "https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/transform",
    json={
        "image": "https://picsum.photos/1200/800",
        "steps": [
            {"op": "resize", "width": 600, "height": 400, "fit": "cover"},
            {"op": "sharpen", "sigma": 1.5},
            {"op": "grayscale"}
        ],
        "outputFormat": "webp",
        "outputQuality": 85
    }
)

data = resp.json()
print(f"Applied {data['stepsApplied']} operations")
print(f"Result: {data['width']}x{data['height']}, {data['size']} bytes")
Node.js
const resp = await fetch(
  "https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/transform",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      image: "https://picsum.photos/1200/800",
      steps: [
        { op: "resize", width: 600, height: 400, fit: "cover" },
        { op: "sharpen", sigma: 1.5 },
        { op: "grayscale" }
      ],
      outputFormat: "webp",
      outputQuality: 85
    })
  }
);

const data = await resp.json();
console.log(`Applied ${data.stepsApplied} operations`);
console.log(`Result: ${data.width}x${data.height}, ${data.size} bytes`);

Available Transform Operations

OperationParametersDescription
resizewidth, height, fitResize with fit mode
cropleft, top, width, heightExtract region
rotateangle, backgroundRotate by degrees
blursigmaGaussian blur
sharpensigmaSharpen details
flip-Flip vertically
flop-Flip horizontally
grayscale-Convert to grayscale
negate-Invert colors
tintcolor (r, g, b)Apply color tint

Composite & Watermark

Overlay one image on another — perfect for adding watermarks, logos, or badges. Control position with x/y coordinates or gravity, and adjust overlay opacity.

Add watermark to image
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/composite \
  -H "Content-Type: application/json" \
  -d '{
    "base": "https://picsum.photos/800/600",
    "overlay": "https://example.com/logo.png",
    "gravity": "southeast",
    "opacity": 0.7,
    "format": "webp"
  }'

Extract Image Metadata

Get dimensions, format, color space, DPI, alpha channel info, and EXIF orientation without downloading the full image.

Extract metadata
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-imageproc/api/metadata \
  -H "Content-Type: application/json" \
  -d '{"image": "https://picsum.photos/800/600"}'

# Response:
{
  "width": 800,
  "height": 600,
  "format": "jpeg",
  "channels": 3,
  "space": "srgb",
  "depth": "uchar",
  "density": 72,
  "hasAlpha": false,
  "orientation": 1,
  "size": 48291
}

Use Cases

📷 Thumbnail Generation

Automatically resize user-uploaded images to multiple sizes (avatar, card, hero) with a single transform pipeline call. Output as WebP for 30-70% smaller files than JPEG.

⚡ Image CDN / Optimization

Convert legacy JPEG/PNG assets to modern WebP or AVIF on the fly. The optimize endpoint reports exact savings percentage so you can track bandwidth reduction.

🤖 AI Agent Image Processing

Give your AI agent the ability to process screenshots, generate QR codes for sharing, add watermarks to generated content, or extract metadata from uploaded images — all via simple REST calls.

🛠 Development & Prototyping

Use the placeholder endpoint for mockups during development. Generate any size/color placeholder image instantly with custom text — no external service needed.

Comparison Table

FeatureAgent ImageProcCloudinaryImgixSharp (self-hosted)
Free tier15 req (no signup)25 credits/mo$0 (1,000 origins)Unlimited (self-run)
Resize
Format conversion6 formats30+66
WebP/AVIF
QR code generationNeeds library
Placeholder imagesNeeds code
Multi-step pipelineURL transformsURL params
Image compositing
Metadata extraction
Setup requiredNoneAccountAccount + sourceServer + Sharp
Input methodURL / base64Upload / URLOrigin URLFile / buffer
Paid plans$0.002/reqFrom $89/moFrom $100/moServer costs

Three Input Methods

Every image endpoint accepts images in three formats:

Max upload size is 10 MB. For URL inputs, the API fetches the image server-side, so there are no CORS issues.

Frequently Asked Questions

What image formats are supported?
The API supports JPEG, PNG, WebP, AVIF, GIF, and TIFF for both input and output. You can convert between any of these formats using the /api/convert endpoint or by setting the format parameter on any endpoint.
Is there a rate limit?
Free tier allows 15 requests without an API key. After that, create a free API key for 100 credits (each request costs 1 credit). Additional credits are $0.002 per request via USDC payment.
What's the maximum image size?
The maximum upload size is 10 MB. For URL inputs, the API fetches the image server-side and checks the size before processing. Output images are returned as base64-encoded strings.
Can I chain multiple operations?
Yes! Use the /api/transform endpoint with a steps array to chain resize, crop, rotate, blur, sharpen, grayscale, flip, flop, negate, and tint operations in a single request. Each step is applied in order.
How do fit modes work for resize?
cover crops to fill the target dimensions, contain fits within dimensions (may add padding), fill stretches to exact dimensions, inside preserves aspect ratio within bounds, outside covers at least the target dimensions.
Can I use this for thumbnails in production?
Yes. The API is built on Sharp, the fastest Node.js image library. For production use, get an API key for higher rate limits. The resize + WebP conversion pipeline typically reduces image sizes by 60-80% compared to unoptimized originals.

Start Processing Images Now

13 endpoints, 6 formats, no signup. Resize, convert, optimize — one API call.

Try Placeholder Image →