Skip to main content

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.

API Spec

See API details

Product Page

Learn more about AI Image Upscaler

How It Works

  1. Provide a source image - Upload the image you want to upscale
  2. Choose scale factor - Select how much to increase resolution
  3. API enhances the image - AI upscales while preserving and improving details
  4. 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

Input Image Quality

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 FactorOutput SizeBest For
2x2× width, 2× heightMinor enhancement, web use
4x4× width, 4× heightPrint 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="."
)

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="."
)

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 FactorCredits
2x upscale50 credits
4x upscale200 credits
Try this in our Google Colab Cookbook: Run this API with sample code. Just add your API key.

API Reference

AI Image Upscaler API Reference

View full API specification

AI Image Generator

Create images from text descriptions

Image Background Remover

Remove image backgrounds