Generate images from a text prompt using DashScope/Bailian (wanx). Use when the user asks to draw, create, generate, or make an image, picture, illustration, or artwork.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Generate Image?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/dashscope-generate-image)
---
description: Generate images from a text prompt using DashScope/Bailian (wanx). Use when the user asks to draw, create, generate, or make an image, picture, illustration, or artwork.
---
# Generate image (DashScope)
Use the `generate_image` MCP tool from the dashscope server to turn a text
prompt into image(s).
## How
1. Call `generate_image` with:
- `prompt`: the user's description (translate to a clear visual prompt;
keep the user's intent).
- `model` (optional): default `wan2.2-t2i-flash`. Use a higher-quality
model only if the user asks.
- `size` (optional): default `1024*1024`.
- `n` (optional): number of images, default 1.
2. The tool blocks until the task finishes and returns `image_urls`.
Present the URL(s) to the user. **URLs expire after 24 hours** — if the
user wants to keep the image, download it to a local file.
## Long tasks / timeouts
If the host tool call may time out, or the user wants to fire-and-forget:
- `submit_image_task(prompt, ...)` → returns `task_id` immediately.
- `get_image_task(task_id)` → poll until `status` is `SUCCEEDED` (then read
`image_urls`), `FAILED`, or `CANCELED`.
- `cancel_image_task(task_id)` → cancel a pending/running task.
## Errors
- Missing/rejected key: ensure `DASHSCOPE_API_KEY` is set in the MCP server
environment (Claude Code: `/plugin configure dashscope`).
- Content moderation block: ask the user to rephrase the prompt.
- Throttling: wait briefly and retry.