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
28
29
30
31
const axios = require('axios');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/stable-diffusion-3-medium-txt2img";
const data = {
"prompt": "A whimsical and high-resolution highly realistic image of a panda in a vintage cosmonaut suit. The panda is holding a sign that reads 'I love flying to the moon!' in playful lettering. The panda's helmet has a small propeller on top and a Indian flag patch, adding to the cosmic vibe. The background features a retro-styled spaceship with rockets and stars, giving the impression of a thrilling journey through space",
"negative_prompt": "bad quality, poor quality, doll, disfigured, jpg, toy, bad anatomy, missing limbs, missing fingers, 3d, cgi",
"samples": 1,
"scheduler": "DPM++ 2M",
"num_inference_steps": 25,
"guidance_scale": 5,
"denoise": 1,
"seed": 468685,
"img_width": 1024,
"img_height": 1024,
"modelsamplingsd3_shift": 3,
"conditioningsettimesteprange_start": 0.1,
"conditioningsettimesteprange_stop": 1,
"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 : 10,
max : 100
Scale for classifier-free guidance
min : 1,
max : 25
How much to transform the reference image
min : 0.1,
max : 1
Seed for image generation.
min : -1,
max : 999999999999999
Image width can be between 512 and 2048 in multiples of 8
Image height can be between 512 and 2048 in multiples of 8
Model Sampling SD3 Shift
min : 1,
max : 10
Conditioning set timestep range start
min : 0.1,
max : 1
Conditioning set timestep range stop
min : 0.1,
max : 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.
Stable Diffusion 3 Medium Text-to-Image (SD3 Medium) is the latest and most advanced addition to the Stable Diffusion family of image-to-image models. SD3 text-to-image Medium is designed to be more resource-efficient, making it a better choice for users with limited computational resources. Due to its smaller size, SD3 Medium can run efficiently on consumer-grade hardware, including consumer PCs and laptops, as well as enterprise-tier GPUs. SD3 Medium is designed to be more resource-efficient, making it a better choice for users with limited computational resources.
SD3 Medium crafts stunningly realistic images, breaking new ground in photorealistic generation. It also tackles intricate prompts with multiple subjects, even if you have a typo or two. SD3 Medium incorporates typography within your images with unparalleled precision, making your message shine.