POST

Generate an image from a text prompt with configurable size, steps, and guidance. Powered by SDXL on Replicate

/v1/image/generate/sdxl

Powered by Stability AI

Request → Response

Examples from schemas.json.

Requestapplication/json
POST /v1/image/generate/sdxl
Content-Type: application/json

{
  "prompt": "Summarize this text in one sentence.",
  "width": 1024,
  "height": 1024,
  "steps": 30,
  "guidance_scale": 7.5,
  "format": "png",
  "return": "url"
}
Responseapplication/json
HTTP/1.1 200 OK
Content-Type: application/json

// Endpoint-specific body after 402 settlement

Overview

Generate an image from a text prompt with configurable size, steps, and guidance. Powered by SDXL on Replicate.

AI company behind Stable Diffusion and SDXL image models.

Request schema

Body: JSON · application/json

FieldTypeDescription
promptstringrequired
negative_promptstringoptional
widthnumber | number | numberrequired
heightnumber | number | numberrequired
stepsintegerrequiredmin: 10
guidance_scalenumberrequiredmin: 1
seedintegeroptionalmin: 0
formatstringrequiredenum: png, jpeg
returnstringrequiredenum: url, base64
IMPLEMENTATION
curl -X POST https://api.tools402.dev/v1/image/generate/sdxl \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Summarize this text in one sentence.",
  "width": 1024,
  "height": 1024,
  "steps": 30,
  "guidance_scale": 7.5,
  "format": "png",
  "return": "url"
}'

402 payment flow omitted — see Integrations for settlement.