Image Resizer & Cropper API Reference
Upload any image to resize it to exact pixel dimensions, crop a region, rotate by 90-degree increments, or flip horizontally/vertically. Supports PNG, JPEG, WebP, AVIF, GIF input. Outputs PNG, JPEG, or WebP. The browser UI uses Canvas API — no image leaves your device.
Endpoint
/api/image-resizerFull URL: https://quickhelp.dev/api/image-resizer
Request
Content-Type: application/json. No authentication required for the anonymous free tier (30 req/min per IP).
| Field | Type | Required | Description |
|---|---|---|---|
| image | string | Yes | Base64-encoded image (no data-URL prefix) |
| width | optional | No | Target width in pixels |
| height | optional | No | Target height in pixels |
| fit | default | No | Resize fit: 'inside' preserves aspect ratio within bounds; 'fill' stretches to exact size; 'cover' fills and crops |
| cropX | optional | No | Crop left offset in pixels |
| cropY | optional | No | Crop top offset in pixels |
| cropWidth | optional | No | Crop width in pixels |
| cropHeight | optional | No | Crop height in pixels |
| rotate | optional | No | Clockwise rotation in degrees |
| flipHorizontal | optional | No | Mirror left-right (flop) |
| flipVertical | optional | No | Mirror top-bottom (flip) |
| format | default | No | Output image format |
| quality | default | No | Quality for JPEG/WebP (1–100) |
Response
Returns application/json. On error, returns a JSON object with an error string field and an appropriate HTTP status code.
| Field | Type | Description |
|---|---|---|
| image | string | Base64-encoded output image |
| format | string | — |
| width | number | — |
| height | number | — |
| originalWidth | number | — |
| originalHeight | number | — |
| sizeBytes | number | — |
Example
Resize to 400 wide, preserve aspect ratio
curl
curl -X POST https://quickhelp.dev/api/image-resizer \
-H 'Content-Type: application/json' \
-d '{"image":"<base64-image>","width":400,"fit":"inside","format":"png"}'Request body
{
"image": "<base64-image>",
"width": 400,
"fit": "inside",
"format": "png"
}Response
{
"image": "<base64-png>",
"format": "png",
"width": 400,
"height": 300,
"originalWidth": 1200,
"originalHeight": 900,
"sizeBytes": 48230
}Error codes
| Status | Meaning |
|---|---|
| 200 | Success — result in response body |
| 400 | Bad request — invalid input; error field describes the problem |
| 404 | Tool not found |
| 429 | Rate limit exceeded (30 req/min anonymous, 300 req/min free key) |
| 500 | Internal server error — transient; retry with exponential back-off |
OpenAPI spec
The full OpenAPI 3.1 specification for all tools is available at /openapi.json. Import it into Postman, Insomnia, or any OpenAPI-compatible client to get all endpoints with schema validation automatically.