Pixotter Image API
Compress, resize, and convert images with a single HTTP request. No signup needed to start.
curl -F "[email protected]" -F "quality=75" https://api.pixotter.com/api/v1/compress -o compressed.jpg
Your first 50 operations per day are free. No API key required.
Base URL
https://api.pixotter.com/api/v1
Authentication
The first 50 operations per day require no authentication. Just send your request.
For higher limits, generate a free API key:
curl -X POST -H "Content-Type: application/json" \
-d '{"email":"[email protected]"}' \
https://api.pixotter.com/api/v1/keys
Then include it in your requests:
curl -H "X-API-Key: px_your_key_here" \
-F "[email protected]" -F "quality=75" \
https://api.pixotter.com/api/v1/compress -o result.jpg
Pricing
No Key
- 50 ops/day per IP
- 10MB file limit
- All operations
Free Account
- 500 ops/month
- 10MB file limit
- API key for tracking
Pay-as-you-go
- Unlimited operations
- 50MB file limit
- Priority processing
Endpoints
Compress an image. Supports JPEG, PNG, WebP, AVIF, GIF, and TIFF.
Parameters
| Name | Type | Description |
|---|---|---|
image | file required | Image file (multipart/form-data) |
quality | integer optional | Output quality, 1-100. Default: 80 |
target_size | integer optional | Target file size in bytes. API will find optimal quality. Overrides quality. |
Example
# Compress to quality 60
curl -F "[email protected]" -F "quality=60" \
https://api.pixotter.com/api/v1/compress -o compressed.jpg
# Compress to target 200KB
curl -F "[email protected]" -F "target_size=204800" \
https://api.pixotter.com/api/v1/compress -o compressed.jpg
Resize an image to exact dimensions or a platform preset.
Parameters
| Name | Type | Description |
|---|---|---|
image | file required | Image file (multipart/form-data) |
width | integer optional | Target width in pixels |
height | integer optional | Target height in pixels |
preset | string optional | Platform preset (see below). Overrides width/height. |
fit | string optional | Resize strategy: cover, contain, fill, inside (default), outside |
Presets
Example
# Resize to 800x600
curl -F "[email protected]" -F "width=800" -F "height=600" \
https://api.pixotter.com/api/v1/resize -o resized.jpg
# Resize using preset
curl -F "[email protected]" -F "preset=instagram-post" \
https://api.pixotter.com/api/v1/resize -o instagram.jpg
Convert an image to a different format.
Parameters
| Name | Type | Description |
|---|---|---|
image | file required | Image file (multipart/form-data) |
format | string required | Target format: jpeg, png, webp, avif, gif, tiff |
quality | integer optional | Output quality, 1-100. Default: 85 |
Example
# Convert PNG to WebP
curl -F "[email protected]" -F "format=webp" \
https://api.pixotter.com/api/v1/convert -o screenshot.webp
# Convert to AVIF with quality 70
curl -F "[email protected]" -F "format=avif" -F "quality=70" \
https://api.pixotter.com/api/v1/convert -o photo.avif
Response
All endpoints return the processed image directly as the response body (binary). Metadata is in response headers:
| Header | Description |
|---|---|
X-Original-Size | Input file size in bytes |
X-Output-Size | Output file size in bytes |
X-Width | Output width in pixels |
X-Height | Output height in pixels |
X-Format | Output format |
X-Elapsed-Ms | Processing time in milliseconds |
X-Savings-Percent | File size reduction percentage (compress only) |
X-RateLimit-Limit | Total operations allowed in period |
X-RateLimit-Remaining | Operations remaining in period |
Errors
Errors return JSON with an error field:
{ "error": "No image file provided. Send as multipart/form-data with field name \"image\"." }
| Status | Meaning |
|---|---|
| 400 | Bad request (missing parameters, invalid format) |
| 401 | Invalid API key |
| 413 | File too large (10MB free tier limit) |
| 422 | Unprocessable image (corrupted or unsupported) |
| 429 | Rate limit exceeded |
Try It
Test the API right here. Select an image and choose an operation.
Privacy
Images are processed and immediately deleted. We never store your images. Only metadata (file size, dimensions, operation, timestamp) is logged for rate limiting and abuse prevention. Full privacy policy.