Skip to main content

Enterprise: Super Resolution Endpoint

Overview

This endpoint returns a super resolution version of an image that is passed to the url attribute.

It also includes a parameter for face enhancement if the processed image is a portrait of a person.

Super Resolution endpoint result

Request

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

Send a POST request to https://stablediffusionapi.com/api/v1/enterprise/super_resolution endpoint to return an upscaled version of the initial image.

Body Attributes

ParameterDescription
keyYour API Key used for request authorization.
urlURL of the image that you want in super resolution.
scaleA number for scaling the image.
webhookSet an URL to get a POST API call once the image generation is complete.
face_enhanceA boolean flag (true/false) for the face enhancement feature.

Example

Body

Body Raw
{
"key": "enterprise_api_key",
"url": "https://pub-8b49af329fae499aa563997f5d4068a4.r2.dev/generations/e5cd86d3-7305-47fc-82c1-7d1a3b130fa4-0.png",
"scale": 3,
"webhook": null,
"face_enhance": true
}

Request

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

var raw = JSON.stringify({
"key": "",
"url": "https://pub-8b49af329fae499aa563997f5d4068a4.r2.dev/generations/e5cd86d3-7305-47fc-82c1-7d1a3b130fa4-0.png",
"scale": 3,
"webhook": null,
"face_enhance": true
});

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

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

Response

{
"status": "success",
"generationTime": 6.90633487701416,
"id": 14938278,
"output": "https://pub-8b49af329fae499aa563997f5d4068a4.r2.dev/generations/1683220732_out.png"
}