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/ssd-1b";
const data = {
"prompt": "with smoke, half ice and half fire and ultra realistic in detail.wolf, typography, dark fantasy, wildlife photography, vibrant, cinematic and on a black background",
"negative_prompt": "scary, cartoon, painting",
"samples": 1,
"scheduler": "UniPC",
"num_inference_steps": 25,
"guidance_scale": 9,
"seed": 36446545871,
"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);
}
})();
Prompt to render
Prompts to exclude, eg. 'bad anatomy, bad hands, missing fingers'
Number of samples to generate.
min : 1,
max : 4
Type of scheduler.
Allowed values:
Number of denoising steps.
min : 20,
max : 100
Scale for classifier-free guidance
min : 1,
max : 25
Seed for image generation.
min : -1,
max : 999999999999999
Can only be 1024 for SDXL
Allowed values:
Can only be 1024 for SDXL
Allowed values:
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.
The Segmind Stable Diffusion Model (SSD-1B) sets a new standard in AI-driven image generation, offering a compact, efficient solution for transforming text into high-quality visuals. At 50% smaller and 60% faster than the Stable Diffusion XL (SDXL), it provides quick and seamless performance without sacrificing image quality.
Leveraging knowledge from expert models like SDXL, ZavyChromaXL, and JuggernautXL through a robust distillation strategy, SSD-1B ensures diverse and impressive visual outputs. Trained on rich datasets including Grit and Midjourney scrape data, it adeptly handles a broad spectrum of textual prompts. For those seeking a reliable and versatile text-to-image tool, Segmind’s SSD-1B is a top choice, ensuring both speed and visual excellence.
Speed and Efficiency: With a 60% speedup compared to its predecessor, SSD-1B ensures rapid text-to-image translations.
Compact Design: Despite being 50% smaller than SDXL, it delivers high-quality visual outputs, showcasing its optimized design.
Diverse Training: Its training on varied datasets ensures a broad spectrum of visual content generation based on user prompts.
Knowledge Distillation: By leveraging insights from multiple expert models, SSD-1B offers a refined and enhanced performance.
Art and Design: It can be used to generate artworks, designs, and other creative content, providing inspiration and enhancing the creative process.
Research: Researchers can use the model to explore generative models, evaluate its performance, and push the boundaries of text-to-image generation.
Safe Content Generation: It offers a safe and controlled way to generate content, reducing the risk of harmful or inappropriate outputs.
As for licensing, SSD -1B operates under the the Apache 2.0 license, a permissive open-source license endorsed by the Apache Software Foundation. It allows users to freely use, modify, and distribute the software, even in proprietary projects. The license also includes an express grant of patent rights from contributors to users and has provisions to handle contributions and protect against patent litigation.