Gravant Labs Upscale API

AI image upscaling with Real-ESRGAN + GFPGAN face enhancement


Authentication

All requests require an API key in the header:

x-api-key: YOUR_API_KEY

Endpoints

POST /api/v1/upscale

Upload and upscale an image.

ParameterTypeDefaultDescription
filefilerequiredJPEG, PNG, or WebP (max 10MB)
scale2 | 42Upscale factor
modelstringgeneral-x4v3general-x4v3 (fast) or x4plus (quality)
face_enhancetrue | falsefalseEnable 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"
}

GET /api/v1/download/{file_id}

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

GET /api/v1/health

Check API status. No authentication required.


Models

ModelSpeedQualityBest for
general-x4v3Fast (~3s)GoodGeneral use
x4plusSlow (~10s)BestMaximum quality

face_enhance adds ~4s for GFPGAN face detection and restoration.


Limits

Max file size10 MB
Rate limit30 requests / minute
File retention1 hour
FormatsJPEG, PNG, WebP

© Gravant Labs