Skip to content
Back to skills

Generate Image

ASecurity

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.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 4, 2026
ai-agentsapi

Works with

  • claude code
  • api
  • mcp

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add dashscope/dashscope-agent-tools-python --skill generate-image --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Generate Image?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Generate Image
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dashscope-generate-image/badge)](https://www.skillsdirectory.com/skills/dashscope-generate-image)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.