We use essential cookies to make our site work. With your consent, we may also use non-essential cookies to improve user experience and analyze website traffic…

🚀 New model available: DeepSeek-V3.1 🚀

CompVis/

stable-diffusion-v1-4

Stable Diffusion is a latent text-to-image diffusion model capable of generating photo-realistic images given any text input.

Public
CompVis/stable-diffusion-v1-4 cover image

HTTP/cURL API

You can use cURL or any other http client to run inferences:

curl -X POST \
    -d '{"prompt": "A photo of an astronaut riding a horse on Mars."}'  \
    -H "Authorization: bearer $DEEPINFRA_TOKEN"  \
    -H 'Content-Type: application/json'  \
    'https://api.deepinfra.com/v1/inference/CompVis/stable-diffusion-v1-4'
copy

which will give you back something similar to:

{
  "images": [
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12PQz3wAAAJDAXkkWn+MAAAAAElFTkSuQmCC"
  ],
  "nsfw_content_detected": [
    false
  ],
  "seed": 42,
  "request_id": null,
  "inference_status": {
    "status": "unknown",
    "runtime_ms": 0,
    "cost": 0.0,
    "tokens_generated": 0,
    "tokens_input": 0
  }
}

copy

Input fields

Input Schema

Output Schema