# Real-ESRGAN > Practical algorithm for general image restoration that upscales images while reducing artifacts, with optional face enhancement ## Quick Reference - Model ID: real-esrgan - Creator: Tencent ARC Lab - Status: active - Base URL: https://api.lumenfall.ai/openai/v1 ## Specifications - Max Input Images: 1 - Input Modalities: image - Output Modalities: image - Supported Modes: Upscale ## Model Identifiers - Primary Slug: real-esrgan - Aliases: realesrgan ## Dates - Released: July 2021 ## Tags image-upscaling, super-resolution, image-enhancement, open-weights ## Available Providers ### Replicate - Config Key: replicate/real-esrgan - Provider Model ID: nightmareai/real-esrgan - Pricing: $0.0025/image - Note: Replicate bills by hardware seconds; ~$0.0025 per typical run. - Source: https://replicate.com/nightmareai/real-esrgan ## Code Examples ### Upscale (/v1/images/edits) #### cURL curl -X POST \ https://api.lumenfall.ai/openai/v1/images/edits \ -H "Authorization: Bearer $LUMENFALL_API_KEY" \ -F "model=real-esrgan" \ -F "image=@source.png" \ -F "prompt=Add a starry night sky to this image" \ -F "size=1024x1024" # Response: # { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] } #### JavaScript import OpenAI from 'openai'; import fs from 'fs'; const client = new OpenAI({ apiKey: 'YOUR_API_KEY', baseURL: 'https://api.lumenfall.ai/openai/v1' }); const response = await client.images.edit({ model: 'real-esrgan', image: fs.createReadStream('source.png'), prompt: 'Add a starry night sky to this image', size: '1024x1024' }); // { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } console.log(response.data[0].url); #### Python from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.lumenfall.ai/openai/v1" ) response = client.images.edit( model="real-esrgan", image=open("source.png", "rb"), prompt="Add a starry night sky to this image", size="1024x1024" ) # { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } print(response.data[0].url) ## Frequently Asked Questions ### How much does Real-ESRGAN cost? Real-ESRGAN starts at $0.0025 per image through Lumenfall. Pricing varies by provider. Lumenfall does not add any markup to provider pricing. ### How do I use Real-ESRGAN via API? You can use Real-ESRGAN through Lumenfall's OpenAI-compatible API. Send requests to the unified endpoint with model ID "real-esrgan". Code examples are available in Python, JavaScript, and cURL. ### Which providers offer Real-ESRGAN? Real-ESRGAN is available through Replicate on Lumenfall. Lumenfall automatically routes requests to the best available provider. ## Links - Model Page: https://lumenfall.ai/models/tencent-arc-lab/real-esrgan - About: https://lumenfall.ai/models/tencent-arc-lab/real-esrgan/about - Providers, Pricing & Performance: https://lumenfall.ai/models/tencent-arc-lab/real-esrgan/providers - API Reference: https://lumenfall.ai/models/tencent-arc-lab/real-esrgan/api - Benchmarks: https://lumenfall.ai/models/tencent-arc-lab/real-esrgan/benchmarks - Use Cases: https://lumenfall.ai/models/tencent-arc-lab/real-esrgan/use-cases - Playground: https://lumenfall.ai/playground?model=real-esrgan - API Documentation: https://docs.lumenfall.ai