
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
stability-client
Advanced tools
A client library for the Stability AI SDK.
Requires an API Key for DreamStudio which can be found here.
# NPM
npm i -g stability-client
# To Update
npm update -g stability-client
# Yarn
yarn global add stability-client
stability \
-s 150 \ # Steps
-c 15 \ # Cfg Scale
-a k_euler_ancestral \ # Diffusion Method
-S 3465383516 \ # Seed
-o ./examples \ # Output Directory
-n 5 \ # 5 images
"a anime still of an highly detailed night cyberpunk city life, bladerunner style!! detailed shops, neon lights, ray tracing, advertising everywhere, people and robots walking around. art by satoshi kon and studio ghibli, in the style of ghost in the shell, muted colours, hyperrealism, cinematic lighting, lush detail, award winning, wlop, octane render, trending on artstation"
![]() | ![]() | ![]() | ![]() | ![]() |
---|
import { generate } from 'stability-client'
const api = generate({
prompt: 'A Stunning House',
apiKey: process.env.DREAMSTUDIO_API_KEY,
})
api.on('image', ({ buffer, filePath }) => {
console.log('Image', buffer, filePath)
})
api.on('end', (data) => {
console.log('Generating Complete', data)
})
Async/Promise API
import { generateAsync } from 'stability-client'
try {
const { res, images } = await generateAsync({
prompt: 'A Stunning House',
apiKey: process.env.DREAMSTUDIO_API_KEY,
})
console.log(images)
} catch (e) {
// ...
}
Usage: stability [options] [prompt]
Generate an image
Arguments:
prompt The text prompt you want to use
Options:
-V, --version output the version number
-H, --height <height> height of image (default: 512)
-W, --width <width> width of image (default: 512)
-c, --cfg_scale <scale> CFG scale factor (default: 7)
-a, --sampler <sampler> Diffusion Method (choices: "ddim", "plms", "k_euler", "k_euler_ancestral", "k_heun", "k_dpm_2", "k_dpm_2_ancestral", "k_lms", default: "k_lms")
-s, --steps <steps> number of steps (default: 50)
-S, --seed <seed> random seed to use (default: 1614811539)
-n, --num_samples <num_samples> number of samples to generate (default: 1)
-e, --engine <engine> engine to use for inference (default: "stable-diffusion-v1")
--no-store do not write aritfacts to disk
-k, --api-key <api-key> DreamStudio API Key (env: DREAMSTUDIO_API_KEY)
-o, --output-dir <outputDir> directory to store images (defaults to cwd)
-d, --debug Additional logging
-h, --help display help for command
nvm use
yarn
yarn build
npm link
export DREAMSTUDIO_API_KEY=...
stability "A stunning house"
FAQs
A client for the Stability AI SDK
The npm package stability-client receives a total of 1,776 weekly downloads. As such, stability-client popularity was classified as popular.
We found that stability-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.