Image
Core functionality module for generating and processing image content
clawhub install imageUpload 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.
# Install Skill (downloads SKILL.md to .claude/skills/) clawhub install image-hosting # Then just tell Claude: "use image-hosting to help me..."
# Same install command — works with all SKILL.md-compatible AI coding tools clawhub install image-hosting
This Skill is compatible with the OpenClaw standard. After installation, a SKILL.md file is auto-generated, usable by any OpenClaw-compatible AI Agent (Claude Code, Cursor, Windsurf, etc.).
# 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分享"