API Documentation
Integrate AI image enhancement into your applications with our simple REST API. Upload images, apply transformations, and retrieve results programmatically.
Quick Links
Authentication
All API requests require authentication using an API key. Include your key in theAuthorization header.
Get Your API Key
- Sign in to your account (Professional tier or higher required)
- Go to Settings → API Keys
- Click "Create API Key" and save it securely
Important: Your API key is shown only once when created. Store it securely!
Authorization: Bearer sk_live_YOUR_API_KEYUpload Image
Upload an image file to get a storage key for processing.
/api/v1/upload/apiRequest
Send a multipart/form-data request with the image file.
Response
{
"storage_key": "uploads/user-id/abc123.jpg",
"filename": "image.jpg",
"size": 1234567,
"content_type": "image/jpeg"
}curl -X POST "https://api.example.com/api/v1/upload/api" \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-F "file=@/path/to/image.jpg"Create Job
Create an image processing job with one or more operations.
/api/v1/jobs/apiRequest Body
{
"input_key": "uploads/user-id/image.jpg",
"operations": [
{
"type": "enhance",
"params": {
"scale": 2
}
}
]
}Available Operations
| Type | Description | Parameters |
|---|---|---|
| enhance | AI-powered upscaling (2x, 4x, 8x) | scale, model (optional) |
| enhance-face | Restore facial details with AI | - |
| denoise | Remove noise and enhance quality | enhancement_level (0-1) |
| deblur | Remove blur and sharpen with AI | strength (0.5-1.5) |
| restore-old-photo | Restore vintage photos (face + damage repair + color) | face_enhancement_level, auto_repair_damage, color_boost |
| remove-background | Remove image background with AI | - |
| blur-background | Blur background while keeping subject sharp | blur_radius (1-100) |
| smart-crop | AI-powered intelligent cropping to aspect ratio | aspect_ratio, padding_percent |
| remove-object | Inpaint/remove objects with AI | mask_data_url |
| remove-text | Remove text and watermarks with AI | - |
| crop-resize | Crop or resize image | width, height, crop params |
| convert | Convert format | output_format, quality |
curl -X POST "https://api.example.com/api/v1/jobs/api" \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input_key": "uploads/user-id/image.jpg",
"operations": [
{"type": "enhance", "params": {"scale": 2}}
]
}'Get Job Status
Check the status of a processing job. Poll until status is completed or failed.
/api/v1/jobs/api/{job_id}Response
{
"id": "abc123-...",
"status": "completed", // queued, processing, completed, failed
"input_url": "uploads/...",
"output_url": "outputs/...", // Available when completed
"error_message": null, // Error details if failed
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:15Z"
}curl "https://api.example.com/api/v1/jobs/api/JOB_ID" \
-H "Authorization: Bearer sk_live_YOUR_API_KEY"Rate Limits
API requests are rate limited based on your subscription tier.
| Tier | Requests/Minute | Requests/Month | Max Keys |
|---|---|---|---|
| Professional | 50 | 50,000 | 10 |
| Business | 200 | 200,000 | 50 |
| Enterprise | 10,000+ | Unlimited | Unlimited |
Rate Limit Headers
Every API response includes headers showing your current rate limit status:
X-RateLimit-Limit: 50 # Max requests per minute
X-RateLimit-Remaining: 45 # Requests remaining
X-RateLimit-Reset: 1705312800 # Unix timestamp when limit resets
X-RateLimit-Limit-Month: 50000
X-RateLimit-Remaining-Month: 49955Complete Example
Here's a complete example that uploads an image, creates a job, and waits for completion.
# 1. Upload image
UPLOAD=$(curl -s -X POST "https://api.example.com/api/v1/upload/api" \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-F "file=@image.jpg")
STORAGE_KEY=$(echo $UPLOAD | jq -r '.storage_key')
# 2. Create job
JOB=$(curl -s -X POST "https://api.example.com/api/v1/jobs/api" \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d "{
\"input_key\": \"$STORAGE_KEY\",
\"operations\": [{\"type\": \"enhance\", \"params\": {\"scale\": 2}}]
}")
JOB_ID=$(echo $JOB | jq -r '.id')
# 3. Poll for completion
while true; do
STATUS=$(curl -s "https://api.example.com/api/v1/jobs/api/$JOB_ID" \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" | jq -r '.status')
echo "Status: $STATUS"
if [ "$STATUS" = "completed" ] || [ "$STATUS" = "failed" ]; then
break
fi
sleep 2
doneNeed Help?
Check our interactive API documentation for more details and try out endpoints directly.
Open Swagger UI