dmxapi-image-generation
/install dmxapi-image-generation
DMXAPI 图片生成/编辑
通过 DMXAPI 统一 CLI 调用多种 AI 模型生成和编辑图片。
前置准备
-
安装 CLI 工具(需要 Node.js 20+):
npm install -g dmxapi-cli -
配置 API Key(从 DMXAPI 控制台 获取):
dmxapi config set apiKey sk-your-api-key
命令格式
dmxapi image [options] \x3Cprompt>
选项
| 选项 | 说明 | 示例 |
|---|---|---|
-m, --model \x3Cmodel> |
模型名称(默认 gemini-3.1-flash-image-preview,推荐) |
-m gemini-3.1-flash-image-preview |
--size \x3Cratio> |
图片比例:auto, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 |
--size 16:9 |
--quality \x3Clevel> |
分辨率:1K(默认)、2K、4K |
--quality 2K |
-n, --count \x3Cn> |
生成数量 | -n 3 |
--image \x3Cpath> |
输入图片路径(可重复多次实现多图融合) | --image ./photo.png |
--web-search |
启用联网搜索增强 | --web-search |
-o, --save \x3Cdir> |
保存目录(默认当前目录) | -o ./output |
-p, --param \x3Ck=v> |
额外 API 参数(可重复) | -p watermark=true |
模型
默认使用 gemini-3.1-flash-image-preview(推荐),效果最佳,支持生图、编辑和联网搜索。一般无需指定 -m 参数。
如需使用其他模型(如 doubao-seedream-5.0-lite、dall-e-3 等),通过 -m 指定即可。
使用步骤
- 根据用户需求确定提示词、模型、尺寸、质量等参数
- 构建
dmxapi image命令并执行 - 图片自动保存到指定目录,将保存路径告知用户
示例
# 文生图
dmxapi image "一只在月球上骑自行车的猫" -o ./output
# 指定比例和质量
dmxapi image "日落风景" --size 16:9 --quality 2K -o ./output
# 图片编辑
dmxapi image "把背景改成星空" --image ./photo.png -o ./output
# 多图融合
dmxapi image "将这两张图片融合成一幅画" --image ./a.png --image ./b.png -o ./output
# 联网搜索增强
dmxapi image "最新款 iPhone 产品图" --web-search -o ./output
# 生成多张
dmxapi image "三只不同颜色的猫" -n 3 -o ./output
注意事项
- 建议始终用
-o指定输出目录 - 图片编辑需提供本地图片文件路径(支持 png/jpg/webp/gif)
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install dmxapi-image-generation - After installation, invoke the skill by name or use
/dmxapi-image-generation - Provide required inputs per the skill's parameter spec and get structured output
What is dmxapi-image-generation?
使用 DMXAPI 平台生成和编辑图片。支持 Gemini、Seedream(豆包即梦)、OpenAI 等多种模型。可进行文生图、图片编辑、多图融合、联网搜索增强生图。当用户需要生成图片、编辑图片、AI 绘图、多图融合时使用此技能。 It is an AI Agent Skill for Claude Code / OpenClaw, with 150 downloads so far.
How do I install dmxapi-image-generation?
Run "/install dmxapi-image-generation" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is dmxapi-image-generation free?
Yes, dmxapi-image-generation is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does dmxapi-image-generation support?
dmxapi-image-generation is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created dmxapi-image-generation?
It is built and maintained by cryptonee.eth (@onee-io); the current version is v1.0.1.