POST/v1/sdxl1.0-realism-lightning
1const axios = require('axios');
2
3
4const api_key = "YOUR API-KEY";
5const url = "https://api.segmind.com/v1/sdxl1.0-realism-lightning";
6
7const data = {
8  "prompt": "A movie still of a fat old man laughing, glasses, suit and tie, white shirt",
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": 10,
13  "guidance_scale": 1.4,
14  "seed": 98556327,
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: 8 ) 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.

Realism Lightning SDXL

The Realism Lightning SDXL model represents a breakthrough in image generation technology, specializing in producing skin realism and anatomically accurate images with a focus on enhancing the realism of features like the eyes. This advanced model is engineered to deliver exceptional quality and precision in creating lifelike visual representations.Distinguished by its emphasis on skin realism, anatomical accuracy, and eye detail, the Realism Lightning SDXL sets a new standard for excellence in generating images that closely mimic real-life characteristics.

A standout feature of the Realism Lightning SDXL is its exceptional ability to swiftly and efficiently create high-quality images that prioritize skin realism and anatomical precision, making it an ideal choice for applications that require lifelike visual content. With the capability to enhance features like eyes and skin texture with unparalleled accuracy, this model offers a unique blend of speed and anatomical fidelity.

To optimize the performance of the Realism Lightning SDXL, ensuring compatibility with the DPM++ SDE Karras / DPM++ SDE sampler is crucial. Utilizing 4-6 sampling steps along with a CFG Scale set between 1 and 2 is recommended to achieve peak performance and efficiency in the image generation process. These tailored settings are essential for unlocking the full potential of this advanced model and producing images that exhibit exceptional realism and detail.