Skip to main content

Enterprise: Super Resolution Endpoint

Overview

Super Resolution API returns a super resolution version of an image that is passed to the url attribute.

Super Resolution endpoint result

Request

--request POST 'https://modelslab.com/api/v1/enterprise/super_resolution/make' \

Send a POST request to https://modelslab.com/api/v1/enterprise/super_resolution/make endpoint to return the corresponding super resolution image of the image passed.

Body Attributes

ParameterDescriptionValues
keyYour API Key used for request authorizationstring
init_imageThe URL of the image that you want to upscaleURL
scaleA number for scaling the imageint
face_enhanceA boolean flag (true/false) for face enhancement featuretrue or false
webhookProvide a URL to receive a POST API call once the image generation is completeURL
track_idThis ID is returned in the response to the webhook API call and will be used to identify the webhook requestinteger

Example

Body

Body Raw
{  
"key": "",
"init_image": "https://i.pinimg.com/564x/fc/8e/6a/fc8e6a075f341284b0f44bf1592f9f3c.jpg",
"face_enhance": false,
"scale": 3,
"webhook": null,
"track_id": null
}

Request

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
"key": "",
"init_image": "https://i.pinimg.com/564x/fc/8e/6a/fc8e6a075f341284b0f44bf1592f9f3c.jpg",
"face_enhance": false,
"scale": 3,
"webhook": null,
"track_id": null
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://modelslab.com/api/v1/enterprise/super_resolution/make", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Response

{
"status": "success",
"generationTime": 7.421302318572998,
"id": 235706,
"output": [
"https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/84363904-e07e-4f96-af2b-b20a92540386_out.png"
],
"proxy_links": "https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/84363904-e07e-4f96-af2b-b20a92540386_out.png",
"meta": {
"init_image": "https://i.pinimg.com/564x/fc/8e/6a/fc8e6a075f341284b0f44bf1592f9f3c.jpg",
"prompt": "masterpiece, best quality, highres",
"watermark": "no",
"upscale_factor": 4,
"controlnet_scale": 0.8,
"controlnet_scale_decay": 1,
"condition_scale": 6,
"tile_size": 200,
"denoise_strength": 0.35,
"temp": "no",
"base64": "no",
"file_prefix": "d449de6f-67a3-4461-9213-ce86890e3a3c.jpg",
"steps": 20
}
}