1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
const axios = require('axios');
const FormData = require('form-data');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/topaz-image-upscale";
const reqBody = {
"image": "https://segmind-resources.s3.amazonaws.com/input/557ae4e3-8057-4668-bf41-ff836d0f73b0-test_upscale_1234142.jpg",
"enhance_model": "Standard V2",
"output_format": "jpg",
"upscale_factor": "2x",
"face_enhancement": false,
"subject_detection": "None",
"face_enhancement_strength": 0.8,
"face_enhancement_creativity": 0
};
(async function() {
try {
const formData = new FormData();
// Append regular fields
for (const key in reqBody) {
if (reqBody.hasOwnProperty(key)) {
formData.append(key, reqBody[key]);
}
}
// Convert and append images as Base64 if necessary
const response = await axios.post(url, formData, {
headers: {
'x-api-key': api_key,
...formData.getHeaders()
}
});
console.log(response.data);
} catch (error) {
console.error('Error:', error.response ? error.response.data : error.message);
}
})();
Upload the image you want to upscale — works best with JPEGs or PNGs of portraits, products, or film frames.
Choose the enhancement type: Standard V2 for general use, High Fidelity V2 for detail-rich images, CGI for digital art.
Allowed values:
Pick jpg for compression or png for lossless quality, PNG is better for sharp edges and transparency.
Allowed values:
Select 2x, 4x, or 6x to boost resolution — ideal for printing, zoom-ins, or turning 720p into 4K.
Allowed values:
Toggle to true if faces are present, great for portraits, character renders, and people in videos.
Focus enhancement on Foreground, Background, or All, use Foreground for products or portraits.
Allowed values:
Set how sharp faces appear (0–1); 0.8 is ideal for natural skin textures, 1.0 for hyper-sharp details.
min : 0,
max : 1
Control artistic liberty in face enhancements, use 0 for realism, higher values for stylized or expressive looks.
min : 0,
max : 1
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Topaz Labs’ upscaling tools are widely used by photographers, digital artists, and content creators to turn low-quality or old photos into high-resolution images suitable for printing, publishing, or professional use. Unlike traditional upscaling methods that simply enlarge pixels (leading to blurry or blocky results), Topaz Labs uses neural networks trained on millions of images to intelligently reconstruct and add realistic detail to a wide range of subjects, including portraits, landscapes, wildlife, and even AI-generated art.
Key features include:
Topaz Labs’ upscaling tools are widely used by photographers, digital artists, and content creators to turn low-quality or old photos into high-resolution images suitable for printing, publishing, or professional use. You can try their free online upscaler or use their desktop software for more advanced controls.
For best results, begin by selecting the right enhance_model — “Standard V2” handles most tasks, but “High Fidelity V2” excels in preserving intricate textures (e.g., fabrics, skin, foliage), while “CGI” is ideal for game renders or stylized outputs.
When upscaling, match your target output with upscale_factor: 2x is great for social posts, 4x for HD displays, and 6x for cinematic or print work. Always set output_format to PNG when image integrity matters (e.g., assets, transparent backgrounds).
If your image includes faces, enabling face_enhancement is crucial. For natural aesthetics, use a face_enhancement_strength between 0.6–0.8. Crank it up to 1.0 if you're aiming for sharp, commercial-style headshots. The face_enhancement_creativity slider gives you control over realism — keep it low (0–0.3) for accurate likeness and higher (0.5+) for creative retouches or anime-style portraits.
The subject_detection setting helps apply enhancements only where needed. Use “Foreground” to sharpen the main subject while keeping the background soft — perfect for portraits or product shots. For full-frame consistency, go with “All”.
Pro tip: Chain this model with your workflow in PixelFlow — generate assets with Ideogram or Flux, then upscale with Topaz for high-resolution, print-ready or broadcast-level outputs.