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 const axios = require('axios'); const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/segmind-vega-rt-v1"; const data = { "prompt": "backlight, wilderness woman hunting in jungle hiding behind leaves, face paintings closeup face portrait, detailed eyes, nature documentary, dry skin, fuzzy skin, lens flare", "num_inference_steps": 4, "seed": 758143278, "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); } })();
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


num_inference_stepsint ( default: 4 ) Affects Pricing

Number of denoising steps.

min : 4,

max : 10


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.

Segmind-VegaRT - Latent Consistency Model (LCM) LoRA of Segmind-Vega

Segmind-VegaRT a distilled consistency adapter for Segmind-Vega that allows to reduce the number of inference steps to only between 2 - 8 steps.

Latent Consistency Model (LCM) LoRA was proposed in LCM-LoRA: A universal Stable-Diffusion Acceleration Module by Simian Luo, Yiqin Tan, Suraj Patil, Daniel Gu et al.

This model is the first base model showing real-time capabilities at higher image resolutions, but has its own limitations;

  1. The model is good at close up portrait images of humans but tends to do poorly on full body images.

  2. Full body images may show deformed limbs and faces.

  3. This model is an LCM-LoRA model, so negative prompt and guidance scale parameters would not be applicable.

  4. Since it is a small model, the variability is low and hence may be best used for specific use cases when fine-tuned.

We will be releasing more fine tuned versions of this model so improve upon these specified limitations.