Resize images to exact dimensions. Upload an image with target width and height, get back the resized image. Supports PNG, JPEG, and WebP.
Base URL:
https://pylon-image-resize-api.fly.dev
| Parameter | Type | Required | Description |
|---|---|---|---|
file | file (multipart) | Yes | Image file to resize |
width | integer | Yes | Target width in pixels |
height | integer | Yes | Target height in pixels |
Returns the resized image (200 OK with original content type).
| Status | Description |
|---|---|
200 | Resized image returned |
402 | Payment required — x402 challenge returned |
400 | Missing file or dimensions |
500 | Resize failed |
$0.01 USDC per request — paid via x402 on Base Sepolia. No API key. No subscription. Pay per call.
curl -X POST "https://pylon-image-resize-api.fly.dev/resize" \
-F "file=@photo.jpg" \
-F "width=800" \
-F "height=600" \
--output resized.jpg
To use Pylon APIs, you need an x402-compatible client with a funded wallet on Base Sepolia. Here's the quick setup:
The x402 flow: your first request returns 402 Payment Required with payment details in headers. The x402 client signs a USDC payment, then retries with payment proof attached. All automatic, all in milliseconds.