---
title: &quot;Use Z Image in OpenClaw via RunAPI — Image API Guide&quot;
url: &quot;https://runapi.ai/openclaw-z-image.md&quot;
canonical: &quot;https://runapi.ai/openclaw-z-image&quot;
locale: &quot;en&quot;
model: &quot;z-image&quot;
---

# Use Z Image in OpenClaw.

Z Image is Alibaba&#39;s fast image generation model with bilingual text rendering in Chinese and English. OpenClaw agents call it through the same RunAPI endpoint and API key used for chat — no extra skills or provider accounts needed.

## API example

```bash
curl -X POST https://runapi.ai/v1/text_to_image \
  -H &quot;Authorization: Bearer $RUNAPI_API_KEY&quot; \
  -H &quot;Content-Type: application/json&quot; \
  -d &#39;{
    &quot;model&quot;: &quot;z-image&quot;,
    &quot;prompt&quot;: &quot;A neon-lit Tokyo street at night with Japanese shop signs, cinematic lighting, 8K detail&quot;
  }&#39;

```

### Response

```json
{
  &quot;task_id&quot;: &quot;tsk_abc123&quot;,
  &quot;status&quot;: &quot;pending&quot;,
  &quot;model&quot;: &quot;z-image&quot;
}

```

## How it works

1. **Configure RunAPI** — Set your RunAPI API key as an environment variable. If you already configured RunAPI for chat in OpenClaw, the same key works for image generation.
2. **Call Z Image** — Send a POST request to the text_to_image endpoint with model set to z-image and a text prompt. Z Image supports both Chinese and English prompts with accurate text rendering.
3. **Get the result** — The API returns a task_id immediately. Poll the task status endpoint until the status changes to completed, then retrieve the generated image URL from the response output.

## Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `model` | `string` | Required. Use z-image. |
| `prompt` | `string` | Text description. Supports Chinese and English. |
| `negative_prompt` | `string` | Optional. What to avoid in the image. |
| `size` | `string` | Optional. Output dimensions, e.g. 1024x1024. |

## FAQ

### Can I use Z Image in OpenClaw?

Yes. If you have RunAPI configured as a provider in OpenClaw, the same API key and endpoint handle Z Image requests. Send a POST to the text_to_image endpoint with model set to z-image.

### Do I need a separate API key for Z Image?

No. The same RUNAPI_API_KEY you use for chat and other models also works for Z Image. All RunAPI models share one key and one credits balance.

### Is Z Image async or sync?

Z Image is async. The API returns a task_id immediately. Poll the task status endpoint or use a webhook callback to know when the image is ready. RunAPI SDKs handle polling automatically.

### What does Z Image cost?

Z Image uses pay-as-you-go pricing at around $0.004 per image, making it one of the cheapest options on RunAPI. Check the RunAPI pricing page for the current rate. There is no monthly subscription or minimum spend.

### How does Z Image compare to Flux or Nano Banana?

Z Image wins on speed and cost -- sub-second generation at a fraction of a cent per image. Flux 2 and Nano Banana produce higher-fidelity output but cost 5-10x more and take longer. Use Z Image for volume work and concept exploration, then switch to Flux 2 or Nano Banana for final selects.

### Does Z Image handle both Chinese and English text in the same image?

Yes. Z Image renders bilingual text accurately in both Chinese and English within a single generated image. You can mix languages in the prompt and the model handles typography for both scripts, which is useful for cross-border marketing materials and multilingual product labels.


## Links

- [OpenClaw setup guide →](https://runapi.ai/openclaw)
- [Z Image models →](https://runapi.ai/models/z-image)
- [Model catalog](https://runapi.ai/models)
- [API docs](https://runapi.ai/docs)
