Input
Configure model parameters
Output
View generated results
Result
Preview, share or download your results with a single click.

Prerequisites
- Create an API Key from the Eachlabs Console
- Install the required dependencies for your chosen language (e.g., requests for Python)
API Integration Steps
1. Create a Prediction
Send a POST request to create a new prediction. This will return a prediction ID that you'll use to check the result. The request should include your model inputs and API key.
import requestsimport timeAPI_KEY = "YOUR_API_KEY" # Replace with your API keyHEADERS = {"X-API-Key": API_KEY,"Content-Type": "application/json"}def create_prediction():response = requests.post("https://api.eachlabs.ai/v1/prediction/",headers=HEADERS,json={"model": "real-esrgan-a100","version": "0.0.1","input": {"image": "your_file.image/jpeg","scale": 4,"face_enhance": false},"webhook_url": ""})prediction = response.json()if prediction["status"] != "success":raise Exception(f"Prediction failed: {prediction}")return prediction["predictionID"]
2. Get Prediction Result
Poll the prediction endpoint with the prediction ID until the result is ready. The API uses long-polling, so you'll need to repeatedly check until you receive a success status.
def get_prediction(prediction_id):while True:result = requests.get(f"https://api.eachlabs.ai/v1/prediction/{prediction_id}",headers=HEADERS).json()if result["status"] == "success":return resultelif result["status"] == "error":raise Exception(f"Prediction failed: {result}")time.sleep(1) # Wait before polling again
3. Complete Example
Here's a complete example that puts it all together, including error handling and result processing. This shows how to create a prediction and wait for the result in a production environment.
try:# Create predictionprediction_id = create_prediction()print(f"Prediction created: {prediction_id}")# Get resultresult = get_prediction(prediction_id)print(f"Output URL: {result['output']}")print(f"Processing time: {result['metrics']['predict_time']}s")except Exception as e:print(f"Error: {e}")
Additional Information
- The API uses a two-step process: create prediction and poll for results
- Response time: ~62 seconds
- Rate limit: 60 requests/minute
- Concurrent requests: 10 maximum
- Use long-polling to check prediction status until completion
Overview
Real-ESRGAN (Enhanced Super-Resolution Generative Adversarial Networks) uses advanced deep learning techniques to upscale low-resolution images. It not only improves the resolution but also restores details, textures, and sharpness, making it ideal for professional photographers, graphic designers, and everyday users.
Technical Specifications
Model Architecture:
- Based on ESRGAN (Enhanced Super-Resolution GAN).
- Trained on large datasets of diverse images for generalization.
Input Requirements:
- Formats: JPEG, PNG, TIFF.
- Recommended Resolution: Up to 720p for optimal performance on the 4x upscale model.
- Max File Size: 20 MB.
Output:
- Formats: JPEG, PNG, TIFF.
- Maximum Resolution: Supports 8K output with no visible loss of quality.
Key Considerations
Artifacts in Low-Quality Images:
- Overly compressed or noisy images may introduce artifacts during upscaling.
Output Consistency:
- Results may vary for complex or heavily edited images.
Tips & Tricks
Maximize Detail Restoration:
- Use the scale 4 model for images requiring the most detail recovery.
Image Cropping:
- Crop images into smaller sections for faster processing of high-res files.
Enable the "Face Enhance" feature for better facial details in portraits.
Capabilities
Super-Resolution Upscaling:
- Enhance images by up to 4x their original resolution without losing quality.
Detail Restoration:
- Rebuild lost textures and sharpen edges for a natural look.
What can I use for?
Photography Enhancement:
- Perfect for improving resolution and details in professional or personal photos.
Graphic Design:
- Enhance assets like icons, logos, or textures for high-res displays.
Video Frame Upscaling:
- Use upscaled images as keyframes in video editing or restoration projects.
Art Preservation:
- Restore and upscale digital or scanned artworks.
E-Commerce and Marketing:
- Improve product images for websites or advertisements.
Restoring old or low-resolution photos.
Enhancing image quality for professional use.
Upscaling images for printing or large-format displays.
Improving facial details in portrait photography.
Things to be aware of
Upscale Old Photos:
- Revive family photos by enhancing resolution and restoring lost details.
Improve Social Media Images:
- Transform compressed images into sharp, professional-looking visuals.
Enhance Game Textures:
- Use for modding or improving in-game textures in older titles.
Create Print-Ready Images:
- Prepare low-res digital images for high-quality printing.
Test on Unique Styles:
- Try upscaling cartoon, anime, or stylized images to explore model versatility.
Restoration: Upload a vintage photo and upscale it using a scale of 2x.
Face Enhancement: Enable the face_enhance option for high-quality portraits.
Creative Editing: Experiment with different scale values to achieve desired effects.
Limitations
Texture Consistency:
- Fine textures like grass or water may occasionally look unnatural after enhancement.
Output Format: PNG
Related AI Models
You can seamlessly integrate advanced AI capabilities into your applications without the hassle of managing complex infrastructure.