Overview

The ImgUploadz REST API allows developers to programmatically upload images from local storage or remote URLs, apply transformations (resize, rotate, format conversion, compression, watermarking), and receive permanent hosting URLs and responsive thumbnails.

https://imguploadz.com/api

Authentication

All API requests require authentication. You must supply your account API token in the HTTP request headers using the token header.

To get your API token, Sign In or Create an Account, then visit your Dashboard > API section.
token: YOUR_API_TOKEN

Rate Limits & File Sizes

5 MB
Max File Size Per Upload
60 req/min
Direct Upload Rate Limit
30 req/min
Remote URL Ingestion Limit

POST /api/upload

multipart/form-data

Upload a binary image file directly from your local filesystem or application memory. Supports automatic WebP conversion, custom compression, dimension resizing, password protection, and auto-removal.

Request Parameters
Parameter Type Required Description
file File Required Binary image file. Supported: JPG, JPEG, PNG, WEBP, GIF, SVG, BMP, ICO (Max 5MB).
type String Optional Convert image to target format: webp, jpg, png, bmp, gif.
compress Integer Optional Lossy compression quality from 0 to 100 (e.g. 80).
password String Optional Protect access to the uploaded file with a custom password.
auto-remove Integer Optional Time in minutes after which file is permanently deleted (e.g. 60 for 1 hour).
watermark String Optional Watermark text overlay on the generated image (up to 20 chars).
size[width] Integer Optional Max image width in pixels (up to 3840px).
size[height] Integer Optional Max image height in pixels (up to 2160px).
Code Examples
curl -X POST "https://imguploadz.com/api/upload" \ -H "token: YOUR_API_TOKEN" \ -F "file=@/path/to/image.jpg" \ -F "compress=80" \ -F "type=webp"
const formData = new FormData();
formData.append('file', fileInputElement.files[0]);
formData.append('compress', 80);
formData.append('type', 'webp');
const response = await fetch('https://imguploadz.com/api/upload', { method: 'POST', headers: { 'token': 'YOUR_API_TOKEN' }, body: formData
});
const data = await response.json();
console.log(data);
import requests
url = "https://imguploadz.com/api/upload"
headers = {"token": "YOUR_API_TOKEN"}
files = {"file": open("image.jpg", "rb")}
data = {"compress": 80, "type": "webp"}
response = requests.post(url, headers=headers, files=files, data=data)
print(response.json())
<?php
$ch = curl_init('https://imguploadz.com/api/upload');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['token: YOUR_API_TOKEN']);
curl_setopt($ch, CURLOPT_POSTFIELDS, [ 'file' => new CURLFile('/path/to/image.jpg'), 'compress' => 80, 'type' => 'webp',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
$response = json_decode($result, true);
print_r($response);
Success Response (200 OK)
{ "result": true, "url": "https://imguploadz.com/file/WbzuUG", "thumb": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
}
Error Response (400 Bad Request)
{ "result": false, "data": "The file field is required."
}

Status Codes

Code Meaning Details
200 OK Success The upload completed successfully. Response contains file URL and thumbnail.
400 Bad Request Invalid Input Missing required parameters, invalid format, or remote URL could not be fetched.
401 Unauthorized Invalid Token Missing or invalid token header, or your account API access is inactive.
429 Rate Limit Too Many Requests You have exceeded the API upload rate limits. Slow down requests.
500 Server Error Internal Error An unexpected server error occurred during image transformation.
Page loader