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": "a futuristic cityscape at dusk, neon lights, reflections in water, ultrarealistic, high contrast, vibrant",
"negative_prompt": "blurry,out of focus",
"samples": 2,
"scheduler": "DPM Multi",
"num_inference_steps": 45,
"guidance_scale": 7,
"seed": 9876543210,
"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);
}
})();Descriptive phrases guide the model's output. Include vivid details and context for diverse results.
Filters out unwanted elements. Use to enforce clarity and aesthetics.
Specifies the number of images to generate. More samples increase diversity, fewer for speed.
min : 1,
max : 4
Determines denoising pattern. 'DPM Multi' for balanced outputs, 'Euler' for sharper results.
Allowed values:
Controls detail via denoising steps. Raise steps for intricate textures, lower for speed.
min : 20,
max : 100
Determines output fidelity to prompt. Higher for precision, lower for creative variance.
min : 1,
max : 25
Ensures repeatable results by fixing randomness. User-defined or random for unique images.
min : -1,
max : 999999999999999
Defines output width; set to 1024 for best clarity and detail.
Allowed values:
Determines output height; fixed at 1024 for optimal resolution.
Allowed values:
Encodes images in Base64 for seamless integration. Enable if encoding is needed.
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.
SSD-1B is a high-performance text-to-image model developed by Segmind that delivers impressive visual results while being significantly more efficient than its predecessors. This compact AI model is 50% smaller and 60% faster than Stable Diffusion XL, making it ideal for developers who need quick turnaround times without sacrificing image quality. Through advanced knowledge distillation techniques, SSD-1B inherits capabilities from expert models like SDXL and JuggernautXL, ensuring diverse outputs across artistic styles and photorealistic renderings. The model generates images at a fixed 1024×1024 resolution, optimized for clarity and detail.
Creative Industries: Graphic designers and illustrators can rapidly prototype concepts, create mood boards, or generate variations of visual ideas without long render times.
Marketing and Advertising: Generate campaign visuals, social media content, or product mockups quickly while maintaining professional quality standards.
Game Development: Create concept art, environment designs, or character references during early development phases.
Research and Education: Academics studying generative AI can experiment with a performant model that balances quality and computational efficiency.
Content Creation: Bloggers, YouTubers, and digital creators can produce custom imagery for thumbnails, headers, and promotional materials.
Crafting Effective Prompts: Include vivid descriptive details, specify artistic style or mood, and add technical terms like "ultrarealistic," "high contrast," or "cinematic lighting" to guide the output. For example: "a futuristic cityscape at dusk, neon lights, reflections in water, ultrarealistic, high contrast, vibrant."
Using Negative Prompts: Filter unwanted elements by specifying terms like "blurry, out of focus, distorted" to enforce clarity and aesthetic consistency.
Parameter Optimization:
Is SSD-1B open-source?
SSD-1B is available through Segmind's platform. Check Segmind's licensing terms for commercial usage rights and integration options.
How does SSD-1B compare to Stable Diffusion XL?
SSD-1B is 50% smaller and 60% faster than SDXL while maintaining comparable image quality through knowledge distillation. It's optimized for speed-critical applications where SDXL might be too resource-intensive.
What resolution does SSD-1B generate?
The model produces images at a fixed 1024×1024 pixel resolution, optimized for detail and clarity without requiring resolution adjustments.
Which scheduler should I use for photorealistic images?
Start with "DPM Multi" for balanced realism. If results need more sharpness, try "Euler" or "DPM2 Karras." Photorealism also benefits from higher inference steps (60-80).
Can I generate multiple variations of the same prompt?
Yes, adjust the samples parameter (1-4 images) or change the seed value while keeping other parameters constant to explore variations efficiently.
What's the ideal guidance scale for creative exploration?
For creative freedom, use guidance scale values between 3-6. This allows the model to interpret your prompt more loosely, producing unexpected and artistic variations.