API Documentation
Integrate AI image enhancement into your applications with our simple REST API. Upload images, apply transformations, and retrieve results programmatically — and automate whole catalogs and shoots, not just single images.
Quick answer
Does EnhanceCraft have an API?
Yes. EnhanceCraft provides a REST API for automating complete AI photo workflows: upload an image, create a processing job — upscaling, background removal, object removal, format conversion, and more — and retrieve the result programmatically. Authentication uses API keys, access is included with Pro, Business, and Enterprise subscriptions, and code examples are provided in Python, JavaScript, and cURL.
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 (Pro 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.enhancecraft.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 upscaling for photos (2x, 4x, 8x) | scale (required: 2/4/8) |
| enhance-anime | AI upscaling optimised for anime, manga, and illustrations (always 4x) | none |
| enhance-face | Restore and sharpen faces in portraits and group photos | enhancement_level (optional, 0.0–1.0) |
| denoise | Remove noise and JPEG artifacts | enhancement_level (optional, 0.0–1.0) |
| deblur | Remove motion/focus blur and sharpen | strength (optional, 0.5–1.5) |
| dehaze | Remove atmospheric haze and fog to restore contrast and distant detail | intensity (optional, 0.0–1.0) |
| restore-old-photo | Restore vintage photos — face repair, colorization, damage repair | face_enhancement_level (0.0–1.0), auto_repair_damage (bool), color_boost (1.0–2.0), enable_colorization (bool), colorization_strength (0.0–1.0) |
| remove-background | Remove image background with AI | output_format (optional: png/jpg) |
| replace-background | Replace background with a color, image, or AI-generated scene | background_type (required: color/image/transparent/prompt); background_color (#RRGGBB), background_image_key, or background_prompt depending on type |
| blur-background | Blur background while keeping subject sharp | blur_radius (optional, 1–100), output_format (optional: png/jpg) |
| smart-crop | AI-powered intelligent cropping to aspect ratio | aspect_ratio (optional: 1:1/4:3/16:9/9:16/3:2/2:3), padding_percent (optional, 0–30) |
| remove-object | Inpaint/remove objects from a masked region | mask_data_url (required, base64 data URL) |
| remove-text | Remove text and watermarks with AI | auto_detect (optional bool, default true); mask_data_url (required when auto_detect is false) |
| perspective-correct | Straighten converging verticals and fix wide-angle barrel distortion | auto_detect (optional bool), barrel_strength (optional, 0.0–1.0), keystone_h / keystone_v (optional, -1.0–1.0) |
| color-grade | Match color and tone to a reference image | reference_key (required: storage key of the reference image), strength (optional, 0.0–1.0) |
| relight | Apply studio-style directional lighting without a reshoot | lighting_preset (optional: studio-left/studio-right/backlit/soft-diffused/golden-side/custom), direction (optional: left/right/top/bottom/none), prompt (optional), num_inference_steps (optional int, 1–50), guidance_scale (optional, 1.0–15.0) |
| reflection-shadow | Add a studio contact shadow and surface reflection to product cut-outs | surface_type (optional: glass/matte/wood), shadow_opacity / shadow_softness / shadow_length / reflection_intensity (optional, 0.0–1.0), background_color (optional #RRGGBB) |
| sky-replace | Swap the sky in exterior shots while keeping the foreground intact | sky_style (optional: clear-blue/partly-cloudy/golden-hour/dramatic), harmonize (optional bool), sky_image_key (optional) |
| twilight | Convert a daytime exterior into a dusk/twilight shot | twilight_style (optional: dusk/blue-hour), window_glow (optional bool), harmonize (optional bool), glow_strength / dusk_strength (optional, 0.0–1.0), sky_image_key (optional) |
| window-pull | Recover the blown-out view through interior windows | sensitivity (optional, 0.1–1.0), view_style (optional: garden/city/sky/custom) |
| virtual-staging | Furnish an empty room with realistic AI furniture (adds a "Virtually Staged" label) | room_type (optional: living-room/bedroom/dining-room/home-office/kids-room), style (optional: modern/scandinavian/mid-century/coastal/farmhouse/luxury), custom_prompt (optional), strength (optional, 0.0–1.0), show_label (optional bool) |
| compress-optimize | Reduce file size via JPEG compression (free, no credits) | quality (optional, 1–100, default 85) |
| crop-resize | Crop and/or resize image (free, no credits) | crop {pixels: [x,y,w,h] or percentage: [x,y,w,h]}, resize {width, height, maintain_aspect}. At least one required. |
| convert | Convert image to a different format (free, no credits) | output_format (required: png/jpg/jpeg/webp), quality (optional, 1–100) |
Workflow Presets (optional preset_type)
Bundled pipelines for e-commerce and real-estate workflows. Send the operations for the pipeline and set the optional preset_type field to bill the whole job at the preset's fixed bundle price instead of the sum of each operation. See the integrations page for what each preset bundles.
| preset_type | Bundle | Credits |
|---|---|---|
| marketplace-amazon | Amazon product pipeline — background removal, 4x upscale, denoise, smart crop, white background | 5 |
| marketplace-shopify | Shopify product pipeline — background removal, 4x upscale, denoise, smart crop | 4 |
| ghost-mannequin | Ghost mannequin — object removal, background removal, 4x upscale | 4 |
| ghost-mannequin-full | Ghost mannequin plus contact shadow and reflection | 5 |
| real-estate-pack | Real estate edit pack — perspective correction, denoise, white balance, lawn enhance | 3 |
| real-estate-pack-windows | Real estate edit pack plus window pull | 5 |
curl -X POST "https://api.enhancecraft.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.enhancecraft.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 |
|---|---|---|---|
| Pro | 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: 49955Frequently Asked Questions
How do I get an EnhanceCraft API key?
Create a key under Settings → API Keys in your account. API access is included with Pro, Business, and Enterprise subscriptions. The key is shown only once when created — store it securely and send it in the Authorization header of every request.
What can the EnhanceCraft API do?
The REST API covers the full image pipeline: upload an image, create a processing job — upscaling, background removal, object removal, format conversion, and more — then poll the job status and download the result. It is built for automating whole catalogs and shoots, with code examples in Python, JavaScript, and cURL.
What are the API rate limits?
Rate limits follow your subscription tier: Pro allows 50 requests/minute and 50,000/month with up to 10 keys; Business allows 200 requests/minute and 200,000/month with up to 50 keys; Enterprise starts at 10,000 requests/minute with unlimited monthly volume. Every response includes X-RateLimit headers showing your current status.
Is API access included in the free plan?
No. API access is included with Pro, Business, and Enterprise subscriptions. The free plan and pay-as-you-go credits cover the web app, where every tool and workflow is available manually.
Complete 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.enhancecraft.com/api/v1/upload/api" \
-H "Authorization: Bearer sk_live_YOUR_API_KEY" \
-F "[email protected]")
STORAGE_KEY=$(echo $UPLOAD | jq -r '.storage_key')
# 2. Create job
JOB=$(curl -s -X POST "https://api.enhancecraft.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.enhancecraft.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