1const axios = require('axios');
4const api_key = "YOUR API-KEY";
5const url = "";
7const data = {
8  "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",
9  "negative_prompt": "scary, cartoon, painting",
10  "samples": 1,
11  "scheduler": "UniPC",
12  "num_inference_steps": 25,
13  "guidance_scale": 9,
14  "seed": 36446545871,
15  "img_width": 1024,
16  "img_height": 1024,
17  "base64": false
20(async function() {
21    try {
22        const response = await, data, { headers: { 'x-api-key': api_key } });
23        console.log(;
24    } catch (error) {
25        console.error('Error:',;
26    }
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


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,

min : 4

schedulerenum:str ( default: DPM2 Karras )

Type of scheduler.

Allowed values:

num_inference_stepsint ( default: 25 ) Affects Pricing

Number of denoising steps.

min : 20,

min : 100

guidance_scalefloat ( default: 7.5 )

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.


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.


  1. Speed and Efficiency: With a 60% speedup compared to its predecessor, SSD-1B ensures rapid text-to-image translations.

  2. Compact Design: Despite being 50% smaller than SDXL, it delivers high-quality visual outputs, showcasing its optimized design.

  3. Diverse Training: Its training on varied datasets ensures a broad spectrum of visual content generation based on user prompts.

  4. Knowledge Distillation: By leveraging insights from multiple expert models, SSD-1B offers a refined and enhanced performance.

Use Cases

  1. Art and Design: It can be used to generate artworks, designs, and other creative content, providing inspiration and enhancing the creative process.

  2. Research: Researchers can use the model to explore generative models, evaluate its performance, and push the boundaries of text-to-image generation.

  3. Safe Content Generation: It offers a safe and controlled way to generate content, reducing the risk of harmful or inappropriate outputs.

SSD -1B License

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.