generate_image
Generate an image from a text prompt using DashScope, save the result locally, and return its file path for preview.
Instructions
文生图。生成结果下载到本地输出目录并返回路径(配合 dsh-image-preview 可内联预览)。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | 尺寸,如 1024*1024(qwen-image 支持像素)或档位 1K/2K/4K;默认由模型决定。 | |
| tier | No | 档位:standard(qwen-image-3.0)/pro(wan2.7-image-pro)/max(qwen-image-3.0-pro),默认 standard。 | standard |
| prompt | Yes | 图片内容描述。 | |
| confirm | No | 必须为 true 才会实际调用付费生成接口;false 时只返回预计费用。 |