1const axios = require('axios');
3const fs = require('fs');
4const path = require('path');
6async function toB64(imgPath) {
7    const data = fs.readFileSync(path.resolve(imgPath));
8    return Buffer.from(data).toString('base64');
11const api_key = "YOUR API-KEY";
12const url = "";
14const data = {
15  "image": "toB64('')",
16  "prompt": "beautiful lady, scandanavian, natural skin, big smile, black hair, dark makeup, wearing a black top, hyperdetailed photography, sharp focus on face, soft light, dark background, head and shoulders portrait, cover, city bokeh background",
17  "negative_prompt": "low quality, ugly, painting",
18  "samples": 1,
19  "scheduler": "UniPC",
20  "num_inference_steps": 30,
21  "guidance_scale": 7.5,
22  "seed": 760941192,
23  "controlnet_scale": 0.5,
24  "base64": false
27(async function() {
28    try {
29        const response = await, data, { headers: { 'x-api-key': api_key } });
30        console.log(;
31    } catch (error) {
32        console.error('Error:',;
33    }
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


imageimage *

Input Image

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: 30 ) Affects Pricing

Number of denoising steps.

min : 10,

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

controlnet_scalefloat ( default: 7.5 )

Scale for classifier-free guidance

min : 0,

min : 1

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 Stable Diffusion 1B (SSD-1B) Canny Model

The Segmind Stable Diffusion 1B (SSD-1B) Canny Model empowers users to transform images with an unprecedented level of control over edge detection parameters, allowing for the meticulous accentuation and definition of edges within any image.

The SSD-1B Canny model is built upon the solid foundation of canny edge detection, renowned for its precision in highlighting the contours within images. This transformative model is engineered to fine-tune edge detection, offering users the flexibility to adjust parameters to their exact specifications. Whether aiming for subtle texture enhancements or dramatic edge definitions, the SSD-1B Canny model stands ready to deliver.


  1. Accurate Edge Detection: Harnesses the renowned canny edge detection for precise edge delineation.

  2. Customizable Control: Provides users with extensive control to customize edge detection to their preferences.

  3. Adaptable Use Cases: Versatile across various applications, from artistic endeavors to technical image analysis.

  4. Immediate Results: Delivers real-time manipulation, offering instant feedback and swift results.

  5. Seamless Integration: Crafted for easy incorporation into diverse platforms, enhancing both image editing solutions and computer vision systems.

Use Cases

  1. Enhanced Image Segmentation: Essential for tasks requiring exact edge detection, ensuring sharp and accurate segmentation..

  2. Focused Image Enhancement: Enables users to bring particular edges into the spotlight, improving image clarity and emphasis.

  3. Creative Visual Effects: Provides artists with the capability to craft striking visual effects through edge manipulation.

  4. Advanced Editing Features: Can be integrated into image editing software, granting advanced edge refinement tools to users..