Generate Image
generate_imageCreate 1024×1024 PNG images from text prompts, or edit a reference image by URL using prompt instructions, and get a time-limited download URL.
Instructions
AI 生图(1024×1024 PNG,按张计费,失败不计费):传 prompt 即文生图;再传 init_image_url(参考图公网 URL,png/jpg/jpeg ≤10MB)即图生图(换装/换景/改背景等编辑指令写在 prompt 里)。 本工具一次调用内完成「提交→等待→出结果」,默认最多等 120 秒(wait_seconds 可调 10~300); 出图成功返回 resultUrl(现签下载链接,1 小时内有效,请提醒用户及时下载转存)。 model 留空自动选:文生图=flux2-klein(快而省),图生图=qwen-image-edit-2511;要更高质量可传 z-image-turbo,在线模型与实时牌价先用 list_image_models 查询。 seed(非负整数)可复现同图:同 prompt + 同 seed 生成一致结果。 若等待超时仍未完成,返回 taskNo(任务不丢失、不计排队费),调用 get_image_task 继续查询。
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 |
|---|---|---|---|
| seed | No | ||
| model | No | ||
| prompt | Yes | ||
| wait_seconds | No | ||
| init_image_url | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||