/install image-hosting
Image Hosting — img402
Upload an image to img402.dev and get a public URL. No account, no API key, no config.
Quick reference
# 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..."}
Workflow
- Get image: Use an existing file, or generate/download one.
- Check size: Must be under 1MB. If larger, resize:
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 - Upload:
curl -s -X POST https://img402.dev/api/free -F image=@/path/to/image.png - Use the URL: The
urlfield in the response is a public CDN link. Embed it wherever needed.
Constraints
- Max size: 1MB
- Retention: 7 days
- Formats: PNG, JPEG, GIF, WebP
- Rate limit: 1,000 free uploads/day (global)
- No auth required
Paid tier
For images that need to persist longer (1 year, 5MB max), use the paid endpoint at $0.01 USDC via x402:
# 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
See https://img402.dev/blog/paying-x402-apis for details on x402 payment.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install image-hosting - After installation, invoke the skill by name or use
/image-hosting - Provide required inputs per the skill's parameter spec and get structured output
What is image-hosting?
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. It is an AI Agent Skill for Claude Code / OpenClaw, with 2027 downloads so far.
How do I install image-hosting?
Run "/install image-hosting" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is image-hosting free?
Yes, image-hosting is completely free (open-source). You can download, install and use it at no cost.
Which platforms does image-hosting support?
image-hosting is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created image-hosting?
It is built and maintained by rahulgi (@rahulgi); the current version is v1.0.0.