# Z-Image

ID: tongyi-mai/z-image
Type: image generation
Vendor: Tongyi-MAI
Released: 2026-01-27
Commercial use: allowed
Description: Tongyi-MAI Z-Image is a 6B single-stream DiT foundation model for high-quality text-to-image generation with strong style coverage and prompt adherence.

## Modes and inputs
- Text → Image (`txt->img`)
  - Prompt only, no input images
- Image → Image (`img->img`)
  - any image: up to 1

## Output
- Aspect ratios: 1:1, 9:7, 7:9, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 9:21. Other ratios snap to the closest one. Without `size` (or with `"auto"`), Mynth picks a ratio for the prompt.
- 4K: no
- Negative prompt: not supported (dropped, no error)

## Pricing (USD)
- Per image: $0.020
- Per input image: Free, charged once for each image it goes into
- Only successful results are charged.

## Usage
Set the request's `model` field to `tongyi-mai/z-image`. Always pass it explicitly.

TypeScript SDK, Text → Image:

```ts
import Mynth from "@mynthio/sdk";

const mynth = new Mynth();

const task = await mynth.image.generate({
  model: "tongyi-mai/z-image",
  prompt: "A lighthouse at dusk, 35mm film",
  size: "16:9",
});

console.log(task.urls[0]);
```

REST (cURL), Text → Image:

```bash
curl https://api.mynth.io/image/generate \
  -H "Authorization: Bearer $MYNTH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tongyi-mai/z-image",
    "prompt": "A lighthouse at dusk, 35mm film",
    "size": "16:9"
  }'
```

CLI, Text → Image:

```bash
npx @mynthio/cli image generate \
  -m tongyi-mai/z-image \
  -p "A lighthouse at dusk, 35mm film" \
  -s 16:9
```

TypeScript SDK, Image → Image:

```ts
import Mynth from "@mynthio/sdk";

const mynth = new Mynth();

const task = await mynth.image.generate({
  model: "tongyi-mai/z-image",
  prompt: "The same lighthouse, now in heavy fog",
  inputs: ["https://cdn.example.com/lighthouse.png"],
});

console.log(task.urls[0]);
```

REST (cURL), Image → Image:

```bash
curl https://api.mynth.io/image/generate \
  -H "Authorization: Bearer $MYNTH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tongyi-mai/z-image",
    "prompt": "The same lighthouse, now in heavy fog",
    "inputs": ["https://cdn.example.com/lighthouse.png"]
  }'
```

CLI, Image → Image:

```bash
npx @mynthio/cli image generate \
  -m tongyi-mai/z-image \
  -p "The same lighthouse, now in heavy fog" \
  -i https://cdn.example.com/lighthouse.png
```

## Links
- Model page: https://mynth.io/models/tongyi-mai%2Fz-image
- Playground: https://mynth.io/playground?_m=tongyi-mai%2Fz-image
- Vendor page: https://tongyi-mai.github.io/Z-Image-blog/
- License: https://www.apache.org/licenses/LICENSE-2.0
- API docs (image generation request): https://mynth.io/docs/api-reference/endpoints/image/generate.md
- Quickstart: https://mynth.io/docs/getting-started.md
- SDK (JS/TS): https://mynth.io/docs/sdks/typescript.md
- This page as JSON: https://mynth.io/models/tongyi-mai%2Fz-image.json

## More from Tongyi-MAI
- Z-Image Turbo [tongyi-mai/z-image-turbo]: https://mynth.io/models/tongyi-mai%2Fz-image-turbo.md

## Similar models
- Krea 2 Turbo [krea/krea-2-turbo]: https://mynth.io/models/krea%2Fkrea-2-turbo.md
- MAI Image 2.6 Flash [microsoft/mai-image-2.6-flash]: https://mynth.io/models/microsoft%2Fmai-image-2.6-flash.md
- Grok Imagine Image [xai/grok-imagine-image]: https://mynth.io/models/xai%2Fgrok-imagine-image.md
- Seedream 5.0 Flash [bytedance/seedream-v5-flash]: https://mynth.io/models/bytedance%2Fseedream-v5-flash.md
- Kling IMAGE 3.0 [klingai/kling-image-3.0]: https://mynth.io/models/klingai%2Fkling-image-3.0.md
