← Back to Forge Gateway

Image API Documentation

Free image processing API. Resize, convert, compress images. No API key needed.

Base URL: https://forge-node.tail2b516d.ts.net

Rate limit: 30 requests/min per IP • Max file: 10MB

Formats: PNG, JPEG, WebP, GIF, BMP, TIFF, ICO

Endpoints

POST /image/resize -- Resize an image

ParameterTypeRequiredDescription
filefileYesImage file (multipart/form-data)
widthint*Target width (1-10000). At least one of width/height required.
heightint*Target height (1-10000)
maintain_aspectboolNoKeep aspect ratio (default: true)
output_formatstringNoOutput format (default: same as input)
qualityintNoJPEG/WebP quality 1-100 (default: 85)
curl -X POST -F "file=@photo.jpg" -F "width=800" https://forge-node.tail2b516d.ts.net/image/resize -o resized.jpg

POST /image/convert -- Convert image format

ParameterTypeRequiredDescription
filefileYesImage file
output_formatstringYesTarget format: png, jpeg, webp, gif, bmp, tiff, ico
qualityintNoQuality 1-100 (default: 85)
curl -X POST -F "file=@logo.png" -F "output_format=webp" https://forge-node.tail2b516d.ts.net/image/convert -o logo.webp

POST /image/compress -- Compress an image

ParameterTypeRequiredDescription
filefileYesImage file
qualityintNoCompression quality 1-100 (default: 60)
output_formatstringNoOutput format (default: same as input)
max_widthintNoMax width for downscaling
max_heightintNoMax height for downscaling

Response headers include X-Original-Size, X-Compressed-Size, and X-Savings-Percent.

curl -X POST -F "file=@big.jpg" -F "quality=50" https://forge-node.tail2b516d.ts.net/image/compress -o small.jpg

POST /image/info -- Get image metadata

ParameterTypeRequiredDescription
filefileYesImage file
curl -X POST -F "file=@photo.jpg" https://forge-node.tail2b516d.ts.net/image/info
{"width":1920,"height":1080,"format":"jpeg","mode":"RGB","file_size_bytes":245760,"file_size_kb":240.0,"has_alpha":false,"is_animated":false,"n_frames":1}

Health Check

GET /health/image

{"status":"ok","service":"image-api"}