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/segmind-vega"; const data = { "prompt": "cinematic photo detailed closeup portraid of a Beautiful cyberpunk woman, robotic parts, cables, lights, text; , high quality photography, 3 point lighting, flash with softbox, 4k, Canon EOS R3, hdr, smooth, sharp focus, high resolution, award winning photo, 80mm, f2.8, bokeh . 35mm photograph, film, bokeh, professional, 4k, highly detailed, high quality photography, 3 point lighting, flash with softbox, 4k, Canon EOS R3, hdr, smooth, sharp focus, high resolution, award winning photo, 80mm, f2.8, bokeh", "negative_prompt": "(worst quality, low quality)", "samples": 1, "scheduler": "UniPC", "num_inference_steps": 25, "guidance_scale": 9, "seed": 1232788698, "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


negative_promptstr ( default: None )

Prompts to exclude, eg. 'bad anatomy, bad hands, missing fingers'


samplesint ( default: 1 ) Affects Pricing

Number of samples to generate.

min : 1,

max : 4


schedulerenum:str ( default: DPM2 Karras )

Type of scheduler.

Allowed values:


num_inference_stepsint ( default: 25 ) Affects Pricing

Number of denoising steps.

min : 20,

max : 100


guidance_scalefloat ( default: 7.5 )

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.

Segmind Vega

Born from the distillation of the renowned Stable Diffusion XL (SDXL), it boasts an unparalleled combination of speed and quality. With a 70% reduction in size and a staggering 100% increase in processing speed, Segmind-Vega emerges as a game-changer in the field. Its training, enriched by diverse datasets such as Grit and Midjourney scrape data, ensures a remarkable versatility in interpreting and visualizing a wide array of textual prompts.

What truly sets the Segmind-Vega Model apart is its sophisticated knowledge distillation approach. By integrating the wisdom of several expert models, including SDXL, ZavyChromaXL, and JuggernautXL, Segmind-Vega synthesizes their strengths while skillfully circumventing their limitations. This synthesis results in a model that not only excels at generating high-quality images but does so with remarkable speed and efficiency. It's a testament to the power of collaborative learning in AI, where the collective knowledge of multiple models is harnessed to achieve a singular, exceptional capability in image generation.

The applications of the Segmind-Vega Model are as diverse as its training datasets. In the world of art and design, it serves as a digital muse, offering artists and designers a plethora of visual possibilities to inspire and enhance their creative processes. Educational sectors benefit immensely, as the model can generate illustrative content to aid in teaching and learning, making complex concepts visually accessible and engaging. For researchers, Segmind-Vega is a valuable tool to explore the frontiers of generative models, analyze biases and limitations, and contribute to the broader understanding of AI behavior. Above all, the model's commitment to safe content generation ensures that it paves the way for responsible and ethical use of AI in creative domains.