AI image upscaling with Real-ESRGAN + GFPGAN face enhancement
All requests require an API key in the header:
x-api-key: YOUR_API_KEY
Upload and upscale an image.
| Parameter | Type | Default | Description |
|---|---|---|---|
file | file | required | JPEG, PNG, or WebP (max 10MB) |
scale | 2 | 4 | 2 | Upscale factor |
model | string | general-x4v3 | general-x4v3 (fast) or x4plus (quality) |
face_enhance | true | false | false | Enable GFPGAN face restoration |
Example:
curl -X POST "https://upscale.gravantlabs.com/api/v1/upscale?scale=2&face_enhance=true" -H "x-api-key: YOUR_API_KEY" -F "file=@photo.jpg"
Response:
{
"file_id": "a1b2c3-d4e5f6",
"scale": 2,
"face_enhance": true,
"input_size": "400x600",
"output_size": "800x1200",
"processing_time": "3.5s",
"download_url": "/api/v1/download/a1b2c3-d4e5f6",
"expires_in": "1 hour"
}
Download the upscaled image. Files expire after 1 hour.
curl -o result.png -H "x-api-key: YOUR_API_KEY" https://upscale.gravantlabs.com/api/v1/download/a1b2c3-d4e5f6
Check API status. No authentication required.
| Model | Speed | Quality | Best for |
|---|---|---|---|
general-x4v3 | Fast (~3s) | Good | General use |
x4plus | Slow (~10s) | Best | Maximum quality |
face_enhance adds ~4s for GFPGAN face detection and restoration.
| Max file size | 10 MB |
| Rate limit | 30 requests / minute |
| File retention | 1 hour |
| Formats | JPEG, PNG, WebP |
© Gravant Labs