Skip to content
Stable Diffusion API

Stable Diffusion API Documentation

Official REST API documentation for Stable Diffusion — text-to-image, img2img, inpainting, ControlNet, and LoRA. Send a POST request with your API key; code samples in cURL, Python, and Node below.

Quickstart

Make your first request in 30 seconds.

curl -X POST 'https://stablediffusionapi.com/api/v4/dreambooth' \
  -H 'Content-Type: application/json' \
  -d '{
    "key": "YOUR_API_KEY",
    "model_id": "sd-1.5",
    "prompt": "a photo of an astronaut riding a horse on mars",
    "width": "512",
    "height": "512",
    "samples": "1",
    "num_inference_steps": "30"
  }'

API reference