zippr.ink Image API
Optimize images from your website, app, or backend. Authenticate with an API key from your dashboard.
Authentication
Send your API key in the Authorization header:
Authorization: Bearer zippr_live_your_api_keyKeys use the format zippr_live_… (production) or zippr_test_… (testing). Create keys in Dashboard → API Keys. The full key is shown only once at creation.
Rate limits
Daily request limits per account plan (UTC day):
- Free — 50 requests/day
- Lite / Standard — 1000 requests/day
- Professional / Enterprise — 10000 requests/day
When exceeded, the API returns HTTP 429 with code rate_limit_exceeded.
Health check
GET https://zippr.ink/api/v1/health
No authentication required.
{
"success": true,
"data": {
"service": "zippr-ink-api",
"version": "1.0.0",
"status": "healthy"
}
}Optimize image (upload)
POST https://zippr.ink/api/v1/images/optimize
multipart/form-data — fields: file (required), quality (1–100), format (original, webp, avif, jpeg, png), max_width, max_height, strip_metadata (boolean). Max file size: 10 MB. Allowed types: JPEG, PNG, WebP, AVIF.
curl -X POST "https://zippr.ink/api/v1/images/optimize" \
-H "Authorization: Bearer zippr_live_your_api_key" \
-F "file=@image.jpg" \
-F "quality=80" \
-F "format=webp" \
-F "max_width=1600"Optimize image (URL)
POST https://zippr.ink/api/v1/images/optimize-url
JSON body with image_url and the same optional parameters as upload.
curl -X POST "https://zippr.ink/api/v1/images/optimize-url" \
-H "Authorization: Bearer zippr_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://example.com/image.jpg",
"quality": 80,
"format": "webp",
"max_width": 1600,
"strip_metadata": true
}'Get optimization job
GET https://zippr.ink/api/v1/images/jobs/:job_id
Retrieve status and URLs for a previous optimization job.
Success response
{
"success": true,
"data": {
"job_id": "job_123",
"original_url": "https://…",
"optimized_url": "https://…",
"original_size_bytes": 850000,
"optimized_size_bytes": 210000,
"compression_ratio": 75.29,
"format": "webp",
"width": 1600,
"height": 900,
"status": "completed"
}
}Error format
{
"success": false,
"error": {
"code": "invalid_image_url",
"message": "The provided image URL is invalid or unreachable.",
"details": {}
}
}Codes: unauthorized, invalid_api_key, rate_limit_exceeded, invalid_file_type, file_too_large, invalid_image_url, optimization_failed, job_not_found, internal_error.
JavaScript
const response = await fetch("https://zippr.ink/api/v1/images/optimize-url", {
method: "POST",
headers: {
"Authorization": "Bearer zippr_live_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
image_url: "https://example.com/image.jpg",
quality: 80,
format: "webp",
max_width: 1600,
strip_metadata: true
})
});
const result = await response.json();
console.log(result.data.optimized_url);Node.js
const fs = require("fs");
const form = new FormData();
form.append("file", new Blob([fs.readFileSync("image.jpg")]), "image.jpg");
form.append("quality", "80");
form.append("format", "webp");
const res = await fetch("https://zippr.ink/api/v1/images/optimize", {
method: "POST",
headers: { Authorization: "Bearer zippr_live_your_api_key" },
body: form
});
const json = await res.json();PHP
$ch = curl_init("https://zippr.ink/api/v1/images/optimize-url");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer zippr_live_your_api_key",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
"image_url" => "https://example.com/image.jpg",
"quality" => 80,
"format" => "webp",
"max_width" => 1600,
"strip_metadata" => true
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
echo $result["data"]["optimized_url"];Best practices
- Store API keys in environment variables, never in client-side code.
- Use
zippr_test_keys while developing. - Prefer WebP or AVIF for smaller file sizes on the web.
- Set
max_widthto match your layout (e.g. 1600 for full-width heroes). - Handle 429 responses with backoff or queueing.
- Only use publicly reachable HTTPS image URLs for optimize-url.