Use Z Image in Hermes Agent.
Z Image is Alibaba's fast image generation model with bilingual text rendering in Chinese and English. Hermes Agent calls it through the RunAPI custom provider endpoint — the same base_url and API key you use for chat, no extra plugins or GPU rentals needed.
Use the RunAPI text_to_image endpoint to generate an image with Z Image.
Requirements:
- Use the RUNAPI_API_KEY environment variable for authentication.
- Send a POST request to https://runapi.ai/v1/text_to_image.
- Set model to "z-image".
- Write a descriptive prompt for the image you want to generate.
- The response returns a task_id. Poll the task status endpoint until the task completes, then retrieve the image URL from the output.
- Use the custom:runapi provider configured in your Hermes Agent config.yaml.
curl -X POST https://runapi.ai/v1/text_to_image \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "z-image",
"prompt": "A neon-lit Tokyo street at night with Japanese shop signs, cinematic lighting, 8K detail"
}'
{
"task_id": "tsk_abc123",
"status": "pending",
"model": "z-image"
}
Use Z Image in Hermes Agent in three steps
Configure RunAPI
Set your RunAPI API key as an environment variable. If you already configured RunAPI as a custom provider in Hermes Agent, the same key and base_url work for image generation.
export RUNAPI_API_KEY=runapi_xxx
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.
text_to_image
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.
task_id: tsk_abc123
Z Image API 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. |
What is Z Image on Hermes Agent?
Z Image delivers what users describe as "insane speed and realism" -- it generates photorealistic images in under a second with strong prompt adherence and accurate facial details. Built on Apache 2.0 open source weights, it is both the fastest and cheapest image model on RunAPI at around $0.004 per image. Hermes Agent calls it through the same custom provider used for chat.
Z Image use cases
Storyboarding for film and animation
Generate storyboard frames at sub-second speed, iterating on compositions and camera angles fast enough to keep up with creative discussions in real time.
E-commerce product visualization
Generate product listing images with realistic materials and lighting at the lowest cost per image on RunAPI, suitable for high-volume catalog generation.
Educational illustrations
Create educational diagrams and illustrations with bilingual text labels, useful for textbooks, course materials, and training content targeting Chinese and English audiences.
Z Image + Hermes Agent questions
Yes. If you have RunAPI configured as a custom provider in Hermes Agent, the same API key and base_url handle Z Image requests. Send a POST to the text_to_image endpoint with model set to 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.
Z Image wins on speed and cost -- sub-second generation at $0.004 per image. Flux 2 and Nano Banana produce higher-fidelity output but cost 5-10x more per image and take longer. Use Z Image for volume work and concept exploration, then switch to Flux 2 or Nano Banana for final production-quality selects.
The open-source weights support LoRA fine-tuning for local deployment. Through the RunAPI endpoint, you use the base model without custom adapters. If you need fine-tuned output, run Z Image locally with your LoRA weights or use a model that supports style references like Ideogram V3.
Hermes Agent general setup
Not configured yet? Start with the RunAPI setup guide for Hermes Agent.
Hermes Agent setup guide →Try Z Image in Hermes Agent today.
Get a free RunAPI key, configure the custom provider, and start generating images with bilingual text rendering.