Image
生成和处理图像内容的基础功能模块
Core functionality module for generating and processing image content
clawhub install image图像托管:将图像上传到 img402.dev 获取公开链接,用于消息分享、文档嵌入或社交媒体发布。
Upload images to img402.dev and get a public URL. Free tier: 1MB max, 7-day retention, no auth. Use when the agent needs a hosted image URL — for sharing in messages, embedding in documents, posting to social platforms, or any context that requires a public link to an image file.
# 安装 Skill(会下载 SKILL.md 到 .claude/skills/) clawhub install image-hosting # 之后直接对 Claude 说"用 image-hosting 帮我…"即可
# 同样的安装命令,兼容所有支持 SKILL.md 的 AI 编程工具 clawhub install image-hosting
此 Skill 兼容 OpenClaw 标准。 安装后自动生成 SKILL.md 文件,任何支持 OpenClaw 协议的 AI Agent(Claude Code、Cursor、Windsurf 等)均可直接调用。
完全免费,无需认证。限制:1MB单文件大小,7天保留期
# Upload (multipart)
curl -s -X POST https://img402.dev/api/free -F image=@/path/to/image.png
# Response
# {"url":"https://i.img402.dev/aBcDeFgHiJ.png","id":"aBcDeFgHiJ","contentType":"image/png","sizeBytes":182400,"expiresAt":"2026-02-17T..."}
sips -Z 1600 /path/to/image.png # macOS — scale longest edge to 1200px
convert /path/to/image.png -resize 1600x1600 /path/to/image.png # ImageMagick
curl -s -X POST https://img402.dev/api/free -F image=@/path/to/image.png
url field in the response is a public CDN link. Embed it wherever needed.# Step 1: Get an upload token (requires x402 payment)
POST https://img402.dev/api/upload/token
# → {"token": "a1b2c3...", "expiresAt": "..."}
# Step 2: Upload with the token
curl -s -X POST https://img402.dev/api/upload \
-H "X-Upload-Token: a1b2c3..." \
-F image=@/path/to/image.png
clawhub image-hosting upload --file screenshot.png && echo "图片已上传,可在返回的URL分享"