POST
javascript
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-realdream-lightning"; const data = { "prompt": "girl in a hat, in a dress Russian patterns, freckles, cornfield, nature background, beautiful landscape, retro style, fashion, magazine cover, professional quality, aesthetics, gentle, beautiful, realism,high detail,high quality, 64k, high resolution, professional photo", "negative_prompt": "blemishes,(worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch), open mouth", "samples": 1, "scheduler": "DPM++ SDE", "num_inference_steps": 8, "guidance_scale": 1.2, "seed": 968875, "img_width": 768, "img_height": 1152, "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); } })();
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

Attributes


promptstr *

Prompt to render


negative_promptstr ( default: None )

blemishes,(worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch), open mouth


samplesint ( default: 1 ) Affects Pricing

Number of samples to generate.

min : 1,

max : 4


schedulerenum:str ( default: DPM++ SDE )

Type of scheduler.

Allowed values:


num_inference_stepsint ( default: 8 ) Affects Pricing

Number of denoising steps.

min : 1,

max : 100


guidance_scalefloat ( default: 1.2 )

Scale for classifier-free guidance

min : 1,

max : 25


seedint ( default: -1 )

Seed for image generation.

min : -1,

max : 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.

RealDream Lightning

Real Dream is a sophisticated image generation model utilizing SDXL Lightning architecture. It creates incredibly realistic images from textual prompts. With the ability to excellently generate human portraits from the user's descriptive text, the model stands out in the level of detail and realism it outputs.

  • Capabilities: Real Dream is skilled at producing high-quality, realistic images. It is particularly proficient in creating detailed and lifelike portraits.

  • Creators: The model was developed by a user by the pseudonym "sinatra" and is hosted on Civitai.

  • Training Data: The training data consists of a diverse assortment of high-resolution images with a focus on realism, especially various human features.

  • Technical Architecture: Real Dream uses the SDXL Lightning architecture, known for its high-quality image generating capabilities.

  • Strengths: The model generates highly realistic images, capturing intricate textures and features. It is also versatile in producing diverse human images.

How to use the model?

Enter a detailed description of the image in the "Prompt" text box. Put a seed value in the "seed" box for reproducibility or enable the "Randomize Seed" toggle for randomness. Click on "Advanced Parameters" for more customization options.In the "Negative Prompt" field, indicate any unwanted elements in the image. Select a scheduler option from the dropdown, e.g., "DPM++ SDE." Indicate the number of steps for the generation process. Fine-tune image adherence to your text prompt with the guidance scale. et the output image dimensions using "img_width" and "img_height."Click "Generate" to create your image.