POST/v1/sdxl1.0-juggernaut-lightning
1const axios = require('axios');
2
3
4const api_key = "YOUR API-KEY";
5const url = "https://api.segmind.com/v1/sdxl1.0-juggernaut-lightning";
6
7const data = {
8  "prompt": "Medium shot, Adorable creature with big reflective eyes, moody lighting, best quality, full body portrait, real picture, intricate details, depth of field, in a forest, fujifilm xt3, outdoors, bright day, beautiful lighting, raw photo, 8k uhd, film grain, unreal engine 5, ray tracing",
9  "negative_prompt": "((close up)),(octane render, render, drawing, 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",
10  "samples": 1,
11  "scheduler": "DPM++ SDE",
12  "num_inference_steps": 5,
13  "guidance_scale": 1,
14  "seed": 2360370499,
15  "img_width": 1024,
16  "img_height": 1024,
17  "base64": false
18};
19
20(async function() {
21    try {
22        const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
23        console.log(response.data);
24    } catch (error) {
25        console.error('Error:', error.response.data);
26    }
27})();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing
Expand

Attributes


promptstr *

Prompt to render


negative_promptstr ( default: None )

blur, noisy, disfigured


samplesint ( default: 1 ) Affects Pricing

Number of samples to generate.

min : 1,

min : 4


schedulerenum:str ( default: DPM++ SDE )

Type of scheduler.

Allowed values:


num_inference_stepsint ( default: 5 ) Affects Pricing

Number of denoising steps.

min : 1,

min : 100


guidance_scalefloat ( default: 1.4 )

Scale for classifier-free guidance

min : 1,

min : 25


seedint ( default: -1 )

Seed for image generation.

min : -1,

min : 999999999999999


img_widthenum:int ( default: 1024 ) Affects Pricing

Can only be 1024 for SDXL

Allowed values:


img_heightenum:int ( default: 1024 ) Affects Pricing

Can only be 1024 for SDXL

Allowed values:


base64boolean ( default: 1 )

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.

Juggernaut Lightning SDXL

The Juggernaut Lightning SDXL model is designed to generate high-quality, photorealistic images from textual descriptions. The Juggernaut Lightning SDXL is fine-tuned on photorealistic images. As an accelerated version of the Juggernaut XL, this model is aimed at creating images of exceptional quality that closely mimic reality. The images produced by this model are not just visually appealing but also incredibly detailed, making them almost indistinguishable from real-life photographs. One of the key features of the Juggernaut Lightning SDXL is its ability to generate images quickly and efficiently, this model can generate high-quality 1024px images in just a few steps.

Using the Juggernaut Lightning SDXL model is straightforward. It’s compatible with the DPM++ SDE Karras / DPM++ SDE sampler, and it’s recommended to use 4-6 sampling steps and a CFG Scale of 1-2. These settings allow for optimal image generation performance.