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: openai/gpt-oss-120b 🚀

stabilityai/

sdxl-turbo

The SDXL Turbo model, developed by Stability AI, is an optimized, fast text-to-image generative model. It is a distilled version of SDXL 1.0, leveraging Adversarial Diffusion Distillation (ADD) to generate high-quality images in less steps.

Public
$0.0002 x (width / 1024) x (height / 1024) x (iters / 5)
Project
stabilityai/sdxl-turbo cover image

OpenAI-compatible HTTP API

This document provides an overview of the DeepInfra-compatible OpenAI image generation API. It allows users to generate AI-created images based on text prompts using DeepInfra models.

Image Generation

curl https://api.deepinfra.com/v1/openai/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DEEPINFRA_TOKEN" \
  -d '{
    "prompt": "A photo of an astronaut riding a horse on Mars.",
    "size": "1024x1024",
    "model": "stabilityai/sdxl-turbo",
    "n": 1
    }'
copy

The API returns a JSON object containing the generated image(s).

Example Response

{
  "created": 1707000000,
  "data": [
    {
      "revised_prompt": "A photo of an astronaut riding a horse on Mars.",
      "b64_json": "/9j/4AAQS..."
    }
  ]
}
copy

Input fields

Input Schema

Output Schema