Category: provider
Model Studio Z-Image Turbo
Use Z-Image Turbo for fast text-to-image generation via the DashScope multimodal-generation API.
Critical model name
Use ONLY this exact model string:
Prerequisites
- Set
DASHSCOPE_API_KEY in your environment, or add dashscope_api_key to ~/.alibabacloud/credentials (env takes precedence).
- Choose region endpoint (Beijing or Singapore). If unsure, pick the most reasonable region or ask the user.
Normalized interface (image.generate)
Request
prompt (string, required)
size (string, optional) e.g. 1024*1024
seed (int, optional)
prompt_extend (bool, optional; default false)
base_url (string, optional) override API endpoint
Response
image_url (string)
width (int)
height (int)
prompt (string)
rewritten_prompt (string, optional)
reasoning (string, optional)
request_id (string)
Quick start (curl)
curl -sS 'https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-d '{
"model": "z-image-turbo",
"input": {
"messages": [
{
"role": "user",
"content": [{"text": "A calm lake at dawn, a lone angler casting a line, cinematic lighting"}]
}
]
},
"parameters": {
"size": "1024*1024",
"prompt_extend": false
}
}'
Local helper script
python skills/ai/image/alicloud-ai-image-zimage-turbo/scripts/generate_image.py \
--request '{"prompt":"a fishing scene at dawn, cinematic, realistic","size":"1024*1024"}' \
--output output/ai-image-zimage-turbo/images/fishing.png \
--print-response
Size notes
- Total pixels must be between
512*512 and 2048*2048.
- Prefer common sizes like
1024*1024, 1280*720, 1536*864.
Cost note
prompt_extend=true is billed higher than false. Only enable when you need rewritten prompts.
Output location
- Default output:
output/ai-image-zimage-turbo/images/
- Override base dir with
OUTPUT_DIR.
Validation
mkdir -p output/alicloud-ai-image-zimage-turbo
for f in skills/ai/image/alicloud-ai-image-zimage-turbo/scripts/*.py; do
python3 -m py_compile "$f"
done
echo "py_compile_ok" > output/alicloud-ai-image-zimage-turbo/validate.txt
Pass criteria: command exits 0 and output/alicloud-ai-image-zimage-turbo/validate.txt is generated.
Output And Evidence
- Save artifacts, command outputs, and API response summaries under
output/alicloud-ai-image-zimage-turbo/.
- Include key parameters (region/resource id/time range) in evidence files for reproducibility.
Workflow
- Confirm user intent, region, identifiers, and whether the operation is read-only or mutating.
- Run one minimal read-only query first to verify connectivity and permissions.
- Execute the target operation with explicit parameters and bounded scope.
- Verify results and save output/evidence files.
References
references/api_reference.md for request/response schema and regional endpoints.
references/sources.md for official docs.
1---2name: alicloud-ai-image-zimage-turbo3description: Generate images with Alibaba Cloud Model Studio Z-Image Turbo (z-image-turbo) via DashScope multimodal-generation API. Use when creating text-to-image outputs, controlling size/seed/prompt_extend, or documenting request/response mapping for Z-Image.4---56Category: provider78# Model Studio Z-Image Turbo910Use Z-Image Turbo for fast text-to-image generation via the DashScope multimodal-generation API.1112## Critical model name1314Use ONLY this exact model string:15- `z-image-turbo`1617## Prerequisites1819- Set `DASHSCOPE_API_KEY` in your environment, or add `dashscope_api_key` to `~/.alibabacloud/credentials` (env takes precedence).20- Choose region endpoint (Beijing or Singapore). If unsure, pick the most reasonable region or ask the user.2122## Normalized interface (image.generate)2324### Request25- `prompt` (string, required)26- `size` (string, optional) e.g. `1024*1024`27- `seed` (int, optional)28- `prompt_extend` (bool, optional; default false)29- `base_url` (string, optional) override API endpoint3031### Response32- `image_url` (string)33- `width` (int)34- `height` (int)35- `prompt` (string)36- `rewritten_prompt` (string, optional)37- `reasoning` (string, optional)38- `request_id` (string)3940## Quick start (curl)4142```bash43curl -sS 'https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \44 -H 'Content-Type: application/json' \45 -H "Authorization: Bearer $DASHSCOPE_API_KEY" \46 -d '{47 "model": "z-image-turbo",48 "input": {49 "messages": [50 {51 "role": "user",52 "content": [{"text": "A calm lake at dawn, a lone angler casting a line, cinematic lighting"}]53 }54 ]55 },56 "parameters": {57 "size": "1024*1024",58 "prompt_extend": false59 }60 }'61```6263## Local helper script6465```bash66python skills/ai/image/alicloud-ai-image-zimage-turbo/scripts/generate_image.py \67 --request '{"prompt":"a fishing scene at dawn, cinematic, realistic","size":"1024*1024"}' \68 --output output/ai-image-zimage-turbo/images/fishing.png \69 --print-response70```7172## Size notes7374- Total pixels must be between `512*512` and `2048*2048`.75- Prefer common sizes like `1024*1024`, `1280*720`, `1536*864`.7677## Cost note7879- `prompt_extend=true` is billed higher than `false`. Only enable when you need rewritten prompts.8081## Output location8283- Default output: `output/ai-image-zimage-turbo/images/`84- Override base dir with `OUTPUT_DIR`.8586## Validation8788```bash89mkdir -p output/alicloud-ai-image-zimage-turbo90for f in skills/ai/image/alicloud-ai-image-zimage-turbo/scripts/*.py; do91 python3 -m py_compile "$f"92done93echo "py_compile_ok" > output/alicloud-ai-image-zimage-turbo/validate.txt94```9596Pass criteria: command exits 0 and `output/alicloud-ai-image-zimage-turbo/validate.txt` is generated.9798## Output And Evidence99100- Save artifacts, command outputs, and API response summaries under `output/alicloud-ai-image-zimage-turbo/`.101- Include key parameters (region/resource id/time range) in evidence files for reproducibility.102103## Workflow1041051) Confirm user intent, region, identifiers, and whether the operation is read-only or mutating.1062) Run one minimal read-only query first to verify connectivity and permissions.1073) Execute the target operation with explicit parameters and bounded scope.1084) Verify results and save output/evidence files.109110## References111112- `references/api_reference.md` for request/response schema and regional endpoints.113- `references/sources.md` for official docs.