Image Upscaling
Upscale images up to 4x using AI (Real-ESRGAN). Returns the enhanced image in your chosen format and resolution.
Overview
Upscale a single image using AI. Increases resolution by 2x or 4x while enhancing detail and reducing blur. Output can be JPEG, PNG, or WebP.
Authentication
Include your API key in the Authorization header.
Authorization: Bearer sk-live-your-api-keyCreate API keys in your . account settings
Request
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
scale_factor | integer | 4 | Upscale factor: 2 or 4 |
output_format | string | jpeg | jpeg, png, or webp. PNG/WebP are ~6x slower. |
quality | integer | 85 | Output quality (1–100). Only applies to JPEG and WebP. |
Body
Send as multipart/form-data.
| Field | Type | Required | Description |
|---|---|---|---|
file | binary | Required | Image file to upscale (JPEG, PNG, WebP). Max 50 MB. |
Examples
curl -X POST "https://api.maskr.io/v1/services/image-upscaling?scale_factor=4&output_format=jpeg&quality=90" \
-H "Authorization: Bearer sk-live-your-api-key" \
-F "[email protected]"Response
{
"job_id": "abc123-def456",
"status": "completed",
"result": {
"job_id": "abc123-def456",
"status": "completed",
"input_filename": "photo.jpg",
"output_url": "https://api.maskr.io/v1/files/abc123-def456?expires=...&sig=...",
"processing_time_ms": 2340.5,
"error": null,
"original_width": 512,
"original_height": 384,
"output_width": 2048,
"output_height": 1536,
"credits_used": 5
},
"error": null
}Response Fields
| Field | Type | Description |
|---|---|---|
job_id | string | Unique job identifier |
status | string | pending, processing, completed, or failed |
result.output_url | string | null | Signed URL to download the upscaled image |
result.original_width / original_height | integer | null | Input image dimensions |
result.output_width / output_height | integer | null | Upscaled output dimensions |
result.processing_time_ms | number | null | Processing time in milliseconds |
result.credits_used | integer | null | Number of credits consumed |
error | string | null | Error message if processing failed |
Batch Processing
Process up to 50 images in a single request. Send multiple files using the files field. The same scale_factor, output_format, and quality query parameters apply to all images in the batch.
curl -X POST "https://api.maskr.io/v1/services/image-upscaling/batch?scale_factor=2&output_format=jpeg" \
-H "Authorization: Bearer sk-live-your-api-key" \
-F "[email protected]" \
-F "[email protected]" \
-F "[email protected]"{
"batch_id": "batch-789",
"status": "completed",
"total_files": 3,
"completed": 3,
"failed": 0,
"results": [
{ "job_id": "job-1", "status": "completed", "output_url": "...", ... },
{ "job_id": "job-2", "status": "completed", "output_url": "...", ... },
{ "job_id": "job-3", "status": "completed", "output_url": "...", ... }
],
"total_processing_time_ms": 7820.3,
"total_credits_used": 15,
"error": null
}If you run out of credits mid-batch, the API processes as many images as possible and marks the rest as failed. Check the completed and failed counts, and inspect each result’s status field.