# Alibaba Z Image Base API

> Z Image Base by Alibaba - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.

Source: https://www.sandbase.ai/models/alibaba/z-image/base
API reference: https://www.sandbase.ai/models/alibaba/z-image/base/docs

## Facts

- Provider: Alibaba
- Type: Image model
- Model ID: `alibaba/z-image/base`
- Price: $0.01 per run
- Capabilities: text to image
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/z-image/base",
  "prompt": "Grandmother knitting by a window, an empty chair by her",
  "output_format": "png"
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call Alibaba Z Image Base through SandBase?

Create a SandBase API key, then send requests with the model ID "alibaba/z-image/base" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate Alibaba account?

No. One SandBase API key and balance gives you access to Alibaba Z Image Base and the other models in the catalog; you do not need to sign up with Alibaba separately.

## README

### Z Image Base

Z-Image Base is Alibaba's 6B open text-to-image model: photorealistic results and bilingual text rendering at a low per-image cost.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Text instruction. |
| `aspect_ratio` | `21:9` / `16:9` / `3:2` / `4:3` / `5:4` / `1:1` / `4:5` / `3:4` / `2:3` / `9:16` | — | Output shape. |
| `output_format` | `jpeg` / `png` | `png` | Output file format. |
| `seed` | integer | random | Fix it to compare prompt changes. |

#### Billing

$0.01 per image.

| Request | Price |
|---|---|
| One image | $0.01 |

Failed runs are not charged.

#### Prompting

- Write subject, setting, style, then light and color.
- Quote text that must appear.

#### Limits

- One image per request.

#### Also on SandBase

Related: `alibaba/z-image/turbo/edit`, `z-image/turbo`.
