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
const axios = require('axios');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/sdxl1.0-nightvis-lightning";
const data = {
"prompt": "a young 25 y.o. beautiful nymph holding a tortoiseshell cat, realistic heterochromia eyes, looking into camera, gloving red hair, photorealistic, dynamic lighting, sparkles, colorful flame, atmospheric scene, medieval style, (masterpiece, top quality, best quality, official art, beautiful and aesthetic:1.2), depth of field, 8k quality, extreme detailed, colorful, award-winning masterpiece",
"negative_prompt": "(octane render, render, drawing, anime, bad photo, bad photography:1.3), (worst quality, low quality, blurry:1.2), (bad teeth, deformed teeth, deformed lips), (bad anatomy, bad proportions:1.1), (deformed iris, deformed pupils), (deformed eyes, bad eyes), (deformed face, ugly face, bad face), (deformed hands, bad hands, fused fingers), morbid, mutilated, mutation, disfigured",
"samples": 1,
"scheduler": "DPM++ SDE",
"num_inference_steps": 10,
"guidance_scale": 1,
"seed": 9985638,
"img_width": 1024,
"img_height": 1024,
"base64": false
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();
Prompt to render
blur, noisy, disfigured
Number of samples to generate.
min : 1,
max : 4
Type of scheduler.
Allowed values:
Number of denoising steps.
min : 1,
max : 100
Scale for classifier-free guidance
min : 1,
max : 25
Seed for image generation.
min : -1,
max : 999999999999999
Can only be 1024 for SDXL
Allowed values:
Can only be 1024 for SDXL
Allowed values:
Base64 encoding of the output image.
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.
The NightVis Lightning SDXL model is meticulously crafted to transform textual descriptions into high-fidelity, photorealistic images of exceptional quality. This model is tailored for precision and speed in generating visually stunning representations. A defining characteristic of the NightVis Lightning SDXL is its unparalleled ability to swiftly and efficiently produce top-tier images, catering to applications that demand rapid image generation without compromising on quality. With the capability to create high-resolution 1024px images in just a few steps, this model sets a new standard for efficiency and excellence in image rendering.
To unlock the full potential of the NightVis Lightning SDXL, it is imperative to ensure seamless compatibility with the DPM++ SDE Karras / DPM++ SDE sampler. Optimal utilization involves implementing 4-6 sampling steps alongside a CFG Scale set between 1 and 2. These specific configurations are instrumental in optimizing the image generation process, enabling users to harness the full power of this sophisticated model effectively.