Imagineai / README.md
Madras1's picture
Upload 4 files
ad04d0f verified
metadata
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

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

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}'