Back to models
Z-Image
Alibaba Tongyi-MAI's 6B Scalable Single-Stream Diffusion Transformer (S3-DiT) base text-to-image model under Apache 2.0, supporting full CFG guidance, diverse aesthetics, and downstream LoRA fine-tuning.
What you can do
- Custom style LoRA fine-tuning base
- Fine-grained CFG and negative-prompt control
- Diverse commercial illustration and posters
Input & output
- Input
- Positive and negative text prompts in Chinese or English with CFG settings
- Output
- Stylistically diverse, high-resolution text-to-image generations
Try a prompt like this
Ink-and-wash mineral pigment illustration of misty karst peaks at dawn, a lone bamboo raft with a warm lantern, subtle gold leaf accents, high detail.
Things to know
Apache 2.0 licensed and runs comfortably within 16GB VRAM; standard 25–50 step sampling is slower than `Z-Image-Turbo` but preserves full negative-prompt control and fine-tuning flexibility.
All listed models publish open weights for self-hosted deployment; check each repository's license before commercial use.
Call it through the API
The platform exposes an OpenAI-compatible API. Use an official SDK or any HTTP client, then set the gateway URL, API key, and model ID.
- Endpoint
POST/v1/images/generations- Model repo ID
Tongyi-MAI/Z-Image
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["API_BASE_URL"],
api_key=os.environ["API_KEY"],
)
result = client.images.generate(
model="Tongyi-MAI/Z-Image",
prompt="Ink-and-wash mineral pigment illustration of misty karst peaks at dawn, a lone bamboo raft with a warm lantern, subtle gold leaf accents, high detail.",
size="1024x1024",
)
print(result.data[0].url)Before running a sample, set the API_BASE_URL (gateway URL) and API_KEY environment variables.
Read the full API guide