Stability AI API
Access Stability AI instantly with Puter.js, and add AI to any app in a few lines of code without backend or API keys.
// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';
puter.ai.txt2img("A beautiful sunset", {
model: "stabilityai/stable-diffusion-3-medium"
}).then(imageElement => {
document.body.appendChild(imageElement);
});
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.txt2img("A beautiful sunset", {
model: "stabilityai/stable-diffusion-3-medium"
}).then(imageElement => {
document.body.appendChild(imageElement);
});
</script>
</body>
</html>
List of Stability AI Models
Stable Diffusion 3 Medium
stabilityai/stable-diffusion-3-medium
Stable Diffusion 3 Medium is a Multimodal Diffusion Transformer (MMDiT) text-to-image model by Stability AI featuring improved image quality, typography, and complex prompt understanding. It uses three pretrained text encoders and was trained on over 1 billion images. The model is optimized for resource efficiency, making it suitable for both consumer hardware and enterprise GPUs.
ImageStable Diffusion XL Base 1.0
stabilityai/stable-diffusion-xl-base-1.0
Stable Diffusion XL Base 1.0 is a text-to-image latent diffusion model by Stability AI that generates more photorealistic images with better composition and legible text compared to earlier SD versions. It uses a mixture-of-experts pipeline and can work standalone or with an optional refiner model for enhanced results. The model runs efficiently on consumer GPUs with 8GB VRAM.
Frequently Asked Questions
The Stability AI API gives you access to models for AI image generation. Through Puter.js, you can start using Stability AI models instantly with zero setup or configuration.
Puter.js supports a variety of Stability AI models, including Stable Diffusion 3 Medium and Stable Diffusion XL Base 1.0. Find all AI models supported by Puter.js in the AI model list.
With the User-Pays model, users cover their own AI costs through their Puter account. This means you can build apps without worrying about infrastructure expenses.
Puter.js is a JavaScript library that provides access to AI, storage, and other cloud services directly from a single API. It handles authentication, infrastructure, and scaling so you can focus on building your app.
Yes — the Stability AI API through Puter.js works with any JavaScript framework, Node.js, or plain HTML. Just include the library and start building. See the documentation for more details.