API Documentation
Complete reference for the Image Optimizer API with examples in multiple programming languages
Your API Key
Click "Customize" to enter your API key and personalize all code examples.
Navigation
Authentication
The Image Optimizer API uses API key authentication. Include your API key in the X-API-Key header with every request.
X-API-Key: api_live_your_key_hereGet your API key by registering here.
Base URL
https://image-optimizer.app/api/v1Endpoints
Process Image
/api/v1/processUpload and process a single image with specified optimization options.
Parameters
fileImage file to process
optionsProcessing options object
Examples
curl -X POST \
-H "X-API-Key: api_live_your_key_here" \
-F "file=@image.jpg" \
-F 'options={"format":"webp","quality":80,"preset":"llm-optimized"}' \
https://image-optimizer.app/api/v1/processInteractive Playground
Test the API directly from your browser. All requests will count towards your usage quota.
API Playground Unavailable
The interactive API playground is only available for logged-in users with valid API keys.
Built-in Presets
llm-optimizedChatGPT, Claude, and other LLM promptsOptimized for AI/LLM processing with maximum token efficiency
{
"format": "webp",
"quality": 75,
"maxDimension": 1024,
"compressionLevel": 6,
"stripMetadata": true
}balancedGeneral web use and documentationGood quality with reasonable file sizes for general use
{
"format": "jpeg",
"quality": 85,
"maxDimension": 1536,
"compressionLevel": 5,
"progressive": true
}high-qualityProfessional presentations and archivalMinimal compression with maximum quality preservation
{
"format": "png",
"quality": 95,
"maxDimension": 2048,
"compressionLevel": 3,
"stripMetadata": false
}apple-optimizediPhone photos, iCloud sharing, Apple devicesNative Apple ecosystem compatibility with HEIC format
{
"format": "heic",
"quality": 85,
"maxDimension": 1920,
"compressionLevel": 6,
"stripMetadata": true
}Error Codes
Bad Request
Invalid parameters, unsupported file type, or file too large
Unauthorized
Invalid or missing API key
Forbidden
API key inactive or account suspended
Payload Too Large
File exceeds tier limit
Rate Limited
Too many requests, check rate limit headers
Internal Error
Server processing error
Rate Limits
Rate limits are enforced per minute based on your subscription tier. Free tier also has daily limits:
Rate Limit Headers
X-RateLimit-Remaining - Requests remaining in current windowX-RateLimit-Reset - Unix timestamp when rate limit resetsRetry-After - Seconds to wait before retrying (on 429 responses)