Endpoints
| Endpoint | What it does | Options |
|---|---|---|
| POST /api/v1/convert | Convert to JPG, PNG, WebP, AVIF, GIF or TIFF | to, quality, width, height, fit, background |
| POST /api/v1/resize | Resize to exact pixels | width, height, fit (cover, contain, inside, fill), to |
| POST /api/v1/compress | Compress, optionally under a size | max_kb, quality, to |
| POST /api/v1/remove-background | Remove background (PNG) or put on a colour | background (#ffffff) |
| POST /api/v1/generate | AI image from text (JSON body) | prompt |
| GET /api/v1/usage | Your usage today |
Send the image as multipart field file (or JSON {"url": "https://…"}) and your key in the x-api-key header. The response is the image itself.
Example (JavaScript)
const fd = new FormData();
fd.append('file', fileInput.files[0]);
fd.append('max_kb', '100');
const r = await fetch('https://imgtoany.com/api/v1/compress', {
method: 'POST', headers: { 'x-api-key': 'YOUR_KEY' }, body: fd,
});
const blob = await r.blob(); // the compressed JPGLimits and fair use
- Free keys: 100 calls and 10 AI images a day (reset at midnight UTC).
- Max upload 25 MB per image.
- Need more? Contact us for a bigger key.
Questions
Do you keep my images?
No. Images are processed in memory and deleted as soon as the response is sent.
Is HEIC supported?
Use the website for HEIC (it converts in the browser). The API reads JPG, PNG, WebP, AVIF, GIF, TIFF and SVG.
Are my files uploaded?
No. This tool runs inside your browser, so your files are processed on your own device and never sent to our server.
Is it really free?
Yes. imgtoany is free to use, with no sign-up, no watermark and no daily limit.