Generate AI images with any model using ImageRouter API (requires API key).
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install image-router或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install image-router⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/image-router/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: imagerouter description: Generate AI images with any model using ImageRouter API (requires API key). homepage: https://imagerouter.io metadata: {"clawdbot":{"emoji":"🎨","requires":{"bins":["curl"]}}} ---
Generate images with any model available on ImageRouter using curl commands.
The test/test model is a free dummy model that is used for testing the API. It is not a real model, therefore you should use other models for image generation.
Get top 10 most popular models:
curl -X POST 'https://backend.imagerouter.io/operations/get-popular-models'
Search available models by name:
curl "https://api.imagerouter.io/v1/models?type=image&sort=date&name=gemini"
Get all available models:
curl "https://api.imagerouter.io/v1/models?type=image&sort=date&limit=1000"
Basic generation with JSON endpoint:
curl 'https://api.imagerouter.io/v1/openai/images/generations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
--json '{
"prompt": "a serene mountain landscape at sunset",
"model": "test/test",
"quality": "auto",
"size": "auto",
"response_format": "url",
"output_format": "webp"
}'
curl 'https://api.imagerouter.io/v1/openai/images/edits' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'prompt=a cyberpunk city at night' \
-F 'model=test/test' \
-F 'quality=high' \
-F 'size=1024x1024' \
-F 'response_format=url' \
-F 'output_format=webp'
curl 'https://api.imagerouter.io/v1/openai/images/edits' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'prompt=transform this into a watercolor painting' \
-F 'model=test/test' \
-F 'quality=auto' \
-F 'size=auto' \
-F 'response_format=url' \
-F 'output_format=webp' \
-F 'image[]=@/path/to/your/image.webp'
curl 'https://api.imagerouter.io/v1/openai/images/edits' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'prompt=combine these images' \
-F 'model=test/test' \
-F 'image[][email protected]' \
-F 'image[][email protected]' \
-F 'image[][email protected]'
curl 'https://api.imagerouter.io/v1/openai/images/edits' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'prompt=fill the masked area with flowers' \
-F 'model=test/test' \
-F 'image[][email protected]' \
-F 'mask[][email protected]'
auto (default), low, medium, highauto (default) or WIDTHxHEIGHT (e.g., 1024x1024). - url (default) - Returns hosted URL - b64_json - Returns base64-encoded image - b64_ephemeral - Base64 without saving to logs
webp (default), jpeg, png{
"created": 1769286389027,
"data": [
{
"url": "https://storage.imagerouter.io/fffb4426-efbd-4bcc-87d5-47e6936bf0bb.webp"
}
],
"latency": 6942,
"cost": 0.004
}
| Feature | Unified (/edits) | JSON (/generations) | |---------|------------------|---------------------| | Text-to-Image | ✅ | ✅ | | Image-to-Image | ✅ | ❌ | | Encoding | multipart/form-data | application/json |
/v1/openai/images/generations and /v1/openai/images/edits are the same for the unified endpointcurl 'https://api.imagerouter.io/v1/openai/images/generations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
--json '{"prompt":"test image","model":"test/test"}'
curl 'https://api.imagerouter.io/v1/openai/images/generations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
--json '{"prompt":"abstract art","model":"test/test"}' \
| jq -r '.data[0].url' \
| xargs curl -o output.webp安装 ImageRouter 后,可以对 AI 说这些话来触发它
Help me get started with ImageRouter
Explains what ImageRouter does, walks through the setup, and runs a quick demo based on your current project
Use ImageRouter to generate AI images with any model using ImageRouter API (requires A...
Invokes ImageRouter with the right parameters and returns the result directly in the conversation
What can I do with ImageRouter in my design & creative workflow?
Lists the top use cases for ImageRouter, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/image-router/ 目录(个人级,所有项目可用),或 .claude/skills/image-router/(项目级)。重启 AI 客户端后,用 /image-router 主动调用,或让 AI 根据上下文自动发现并使用。
ImageRouter 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
ImageRouter 可免费安装使用。请查阅仓库了解许可证信息。
Generate AI images with any model using ImageRouter API (requires API key).
ImageRouter 属于「Design & Creative」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my design & creative tasks using ImageRouter
Identifies repetitive steps in your workflow and sets up ImageRouter to handle them automatically