Overview
AI Image Upscaler enhances image resolution and quality using AI-powered upscaling technology. The API increases image size while preserving and improving details, reducing artifacts, and maintaining visual fidelity at higher resolutions.
How It Works
Provide a source image - Upload the image you want to upscale
Choose scale factor - Select how much to increase resolution
API enhances the image - AI upscales while preserving and improving details
Download the result - Retrieve your high-resolution image
Use Cases
Print preparation - Enhance low-res images for print quality
E-commerce - Improve product photo quality for web display
Photo restoration - Upscale old or degraded images
Large format displays - Prepare images for billboards or banners
Archive enhancement - Improve historical or archival images
Best Practices
Start with the best quality available - While AI upscaling is powerful, better input produces
better output.
Avoid heavily compressed images - JPEG artifacts will be amplified
Use original files when possible - Avoid screenshots of screenshots
Check for existing blur - AI can’t recover details that aren’t there
Scale Factor Selection
Scale Factor Output Size Best For 2x 2× width, 2× height Minor enhancement, web use 4x 4× width, 4× height Print preparation, large displays
Image Types That Upscale Well
✅ Works great:
Photographs with clear subjects
Artwork and illustrations
Product images
Portraits and faces
⚠️ May have limitations:
Heavily compressed images (visible artifacts)
Very blurry images
Text-heavy images (use vector formats instead)
Code Examples
Basic 2x Upscaling
from magic_hour import Client
from os import getenv
client = Client( token = getenv( "API_TOKEN" ))
result = client.v1.ai_image_upscaler.generate(
assets = {
"image_file_path" : "https://raw.githubusercontent.com/runshouse/Sample_Assets/main/sea.jpg"
},
scale_factor = 2.0 ,
style = {
"enhancement" : "Creative"
},
name = "Image Upscaler image" ,
wait_for_completion = True ,
download_outputs = True ,
download_directory = "./outputs/"
)
if result.status == "complete" :
print ( f "✅ Upscale complete!" )
print ( f "Downloaded to: { result.downloaded_paths } " )
print ( f "Credits charged: { result.credits_charged } " )
else :
print ( f "❌ Job failed with status: { result.status } " )
if hasattr (result, 'error_message' ):
print ( f "Error: { result.error_message } " )
4x Upscale
result = client.v1.ai_image_upscaler.generate(
assets = {
"image_file_path" : "https://raw.githubusercontent.com/runshouse/Sample_Assets/main/eagle.jpg"
},
scale_factor = 4.0 ,
style = {
"enhancement" : "Balanced"
},
name = "Image Upscaler image" ,
wait_for_completion = True ,
download_outputs = True ,
download_directory = "./outputs/"
)
if result.status == "complete" :
print ( f "✅ Upscale complete!" )
print ( f "Downloaded to: { result.downloaded_paths } " )
print ( f "Credits charged: { result.credits_charged } " )
else :
print ( f "❌ Job failed with status: { result.status } " )
if hasattr (result, 'error_message' ):
print ( f "Error: { result.error_message } " )
Pricing
Scale Factor Credits 2x upscale 50 credits 4x upscale 200 credits
API Reference
AI Image Upscaler API Reference View full API specification