Skip to content

Stable Diffusion 3.5 Large Turbo

stable-diffusion-3.5-large-turbo is Stability AI Stable Diffusion 3.5 Large Turbo for fast generation and editing.

API surface

OperationEndpointMode
Image generationPOST /v1/images/generationsSync
Image generation taskPOST /v1/async/images/generationsAsync
Image editingPOST /v1/images/editsSync
Image editing taskPOST /v1/async/images/editsAsync

Model ids

Model idBest for
stable-diffusion-3.5-large-turboFast Stable Diffusion generation and editing

Pricing

Model idCredits / image
stable-diffusion-3.5-large-turbo4

Request fields

FieldTypeRequiredDescription
modelstringYesUse stable-diffusion-3.5-large-turbo. Model ids are case-sensitive.
promptstringYesPrompt text, up to 2,000 characters.
imagestring | string[]For editsPublic image URL or an array of image URLs.
nintegerNoNumber of outputs. Default 1, maximum 9.
sizestringNoProvider-supported output size. Forwarded as-is for this family.
qualitystringNoOptional provider quality value.
output_formatstringNoOptional output format such as png, when supported upstream.
providerOptionsobjectNoAdditional provider fields passed through by the gateway.

Example

bash
curl https://api.pixapi.ai/v1/images/generations \
  -H "Authorization: Bearer $PIXAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"stable-diffusion-3.5-large-turbo","prompt":"A clean editorial product photo on a warm gray background","n":1,"size":"1024x1024"}'
py
import os
import requests

response = requests.post(
    "https://api.pixapi.ai/v1/images/generations",
    headers={
        "Authorization": f"Bearer {os.environ['PIXAPI_KEY']}",
        "Content-Type": "application/json",
    },
    json={
  "model": "stable-diffusion-3.5-large-turbo",
  "prompt": "A clean editorial product photo on a warm gray background",
  "n": 1,
  "size": "1024x1024"
},
)
response.raise_for_status()
print(response.json())
js
const response = await fetch('https://api.pixapi.ai/v1/images/generations', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PIXAPI_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "model": "stable-diffusion-3.5-large-turbo",
  "prompt": "A clean editorial product photo on a warm gray background",
  "n": 1,
  "size": "1024x1024"
}),
});

if (!response.ok) {
  throw new Error(await response.text());
}

console.log(await response.json());
go
package main

import (
  "bytes"
  "fmt"
  "io"
  "net/http"
  "os"
)

func main() {
  body := []byte(`{
  "model": "stable-diffusion-3.5-large-turbo",
  "prompt": "A clean editorial product photo on a warm gray background",
  "n": 1,
  "size": "1024x1024"
}`)

  req, err := http.NewRequest(
    "POST",
    "https://api.pixapi.ai/v1/images/generations",
    bytes.NewBuffer(body),
  )
  if err != nil {
    panic(err)
  }
  req.Header.Set("Authorization", "Bearer "+os.Getenv("PIXAPI_KEY"))
  req.Header.Set("Content-Type", "application/json")

  resp, err := http.DefaultClient.Do(req)
  if err != nil {
    panic(err)
  }
  defer resp.Body.Close()

  result, _ := io.ReadAll(resp.Body)
  fmt.Println(string(result))
}

Edit an image

json
{
  "model": "stable-diffusion-3.5-large-turbo",
  "prompt": "Replace the background with a minimalist studio set",
  "image": "https://example.com/input.png",
  "n": 1
}

For async requests and task polling, see Async Media Tasks.

For the shared response shape, see the API Reference.