File size: 1,025 Bytes
ad04d0f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | ---
title: Z-Image-Turbo API
emoji: 🎨
colorFrom: purple
colorTo: blue
sdk: docker
pinned: false
license: apache-2.0
---
# 🎨 Z-Image-Turbo API
Generate high-quality images from text using Alibaba's **Z-Image-Turbo** model.
## ⚠️ Performance Note
This Space runs on **CPU only**. Expect generation times of **2-5 minutes per image**.
## 📡 API Usage
### POST /generate
```python
import requests
response = requests.post(
"https://YOUR_SPACE.hf.space/generate",
json={
"prompt": "a beautiful sunset over mountains",
"width": 512,
"height": 512,
"seed": -1,
"num_steps": 8
}
)
data = response.json()
# data["image_base64"] contains the PNG image as base64
# data["seed"] contains the seed used
```
### cURL
```bash
curl -X POST "https://YOUR_SPACE.hf.space/generate" \
-H "Content-Type: application/json" \
-d '{"prompt": "a cat in space", "width": 512, "height": 512, "seed": -1, "num_steps": 8}'
```
|