Skip to content

Create Upscale

POST
/api/v1/generation-upscale

Upscale an existing generated image or any provided image URL while maintaining sharpness. Specify the input using one of the following:

  • generation_result_id - ID of a previously generated result.
  • image_url - URL of any image.

Upscaling Models:

  • model_name - Select the upscaling model based on your quality and budget requirements:
    • recraft - Standard upscaling model optimized for speed and cost-efficiency. Preserves original image details without modifications (1 credit)
    • topaz - Premium upscaling model with advanced enhancement algorithms. Delivers superior skin texture and overall image quality, though may apply subtle refinements to clothing details (3 credits)

Enhanced Settings (Optional - Topaz only):

  • generation_settings - Configure upscale model parameters:
Parameter Options Default Description
enhance_model Standard V2, Low Resolution V2, High Fidelity V2 High Fidelity V2 Enhancement algorithm: Standard V2 (general purpose), Low Resolution V2 (for low-res images), High Fidelity V2 (preserves details)
upscale_factor 2x, 4x, 6x 4x How much to upscale the image
face_enhancement true, false false Enable specialized facial feature enhancement
subject_detection Foreground, Background, Auto Foreground Controls which part of the image receives primary focus
face_enhancement_creativity 0.0-1.0 0.5 Level of creativity for face enhancement (ignored if face_enhancement is false)

Note: Generated images referenced by generation_result_id are only available for 4 hours after completion. Recraft model uses fixed optimal settings and does not accept custom generation_settings.

Authorizations

HTTPBearer
TypeHTTP (bearer)

Request Body

JSON
{
"generation_result_id": 0,
"image_url": "",
"model_name": "string",
"generation_settings": {
"additionalProperties": "string"
}
}

Responses

Successful Response
application/json
JSON
{
"generation_id": 0,
"created_at": "string",
"updated_at": "string"
}

Samples

cURL
curl -X POST \
'https://api.uwear.ai/api/v1/generation-upscale' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://api.uwear.ai/api/v1/generation-upscale', {method:'POST',headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://api.uwear.ai/api/v1/generation-upscale';
$method = 'POST';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://api.uwear.ai/api/v1/generation-upscale'

headers = {
    'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers)
print(response.json())
Powered by VitePress OpenAPI