Enhanced Super-Resolution GAN that upscales images by a configurable factor with optional face enhancement, with multiple Real-ESRGAN model variants
Example outputs coming soon
Details
esrgan
Providers & Pricing (1)
ESRGAN is available exclusively through fal.ai, starting at $0.00111/image.
Output
Pricing Notes (1)
- • Billed per compute second via the x-fal-billable-units response header.
ESRGAN API OpenAI-compatible
https://api.lumenfall.ai/openai/v1
esrgan
Code Examples
Upscale
/v1/images/editscurl -X POST \
https://api.lumenfall.ai/openai/v1/images/edits \
-H "Authorization: Bearer $LUMENFALL_API_KEY" \
-F "model=esrgan" \
-F "[email protected]" \
-F "prompt=Add a starry night sky to this image" \
-F "size=1024x1024"
# Response:
# { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] }
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: '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);
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.lumenfall.ai/openai/v1"
)
response = client.images.edit(
model="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)
Parameter Normalization
How we handle parameters across different providers
Not every provider speaks the same language. When you send a parameter, we handle it in one of four ways depending on what the model supports:
| Behavior | What happens | Example |
|---|---|---|
passthrough |
Sent as-is to the provider | style, quality |
renamed |
Same value, mapped to the field name the provider expects | prompt |
converted |
Transformed to the provider's native format | size |
emulated |
Works even if the provider has no concept of it | n, response_format |
Parameters we don't recognize pass straight through to the upstream API, so provider-specific options still work.
ESRGAN FAQ
How much does ESRGAN cost?
ESRGAN starts at $0.00111 per image through Lumenfall. Pricing varies by provider. Lumenfall does not add any markup to provider pricing.
How do I use ESRGAN via API?
You can use ESRGAN through Lumenfall's OpenAI-compatible API. Send requests to the unified endpoint with model ID "esrgan". Code examples are available in Python, JavaScript, and cURL.
Which providers offer ESRGAN?
ESRGAN is available through fal.ai on Lumenfall. Lumenfall automatically routes requests to the best available provider.
Try ESRGAN in Playground
Generate images with custom prompts — no API key needed.