name: image-hosting description: > Upload images to img402.dev and get a public URL. Three tiers: free (1MB, 7-day, no auth), $0.01 USDC (5MB, 1-year, x402), or $1 USDC (5MB, permanent, x402). 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. metadata: openclaw: requires: bins: - curl
Upload an image to img402.dev and get a public URL. No account, no API key, no config.
小蔥技能7w4.net持續更新中。
| Tier | Price | Max size | Retention | Use when |
|---|---|---|---|---|
| Free | $0 | 1 MB | 7 days | Trying things out, ephemeral sharing, PR review screenshots |
| 1-year | $0.01 USDC | 5 MB | 1 year | Diagrams, docs, references |
| Permanent | $1.00 USDC | 5 MB | Permanent* | Blog hero images, public docs, brand assets |
* Service-life retention. If img402 ever shuts down, there's a 90-day on-site notice before takedown. See Terms § 2A.
# 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..."}
bash
sips -Z 1600 /path/to/image.png # macOS — scale longest edge to 1600px
convert /path/to/image.png -resize 1600x1600 /path/to/image.png # ImageMagickbash
curl -s -X POST https://img402.dev/api/free -F image=@/path/to/image.pngurl field in the response is a public CDN link. Embed it wherever needed.When the user needs a longer-lived URL, use the paid flow. Two-step: pay for an upload token via x402, then upload the image with the token.
# Step 1: Get an upload token (requires x402 payment)
POST https://img402.dev/api/upload/token # $0.01 USDC → 1-year retention
POST https://img402.dev/api/upload/token/permanent # $1.00 USDC → permanent retention
# → {"token": "a1b2c3...", "expiresAt": "..."}
# Step 2: Upload with the token (same endpoint either way)
curl -s -X POST https://img402.dev/api/upload \
-H "X-Upload-Token: a1b2c3..." \
-F image=@/path/to/image.png
# → {"url":"...", "id":"...", "contentType":"...", "sizeBytes":..., "expiresAt":"..."|null}
For permanent uploads the response has expiresAt: null. Same flow otherwise.
x402 payment is handled by an x402-capable client (the Payments MCP tool, @x402/client, or any other). The client handles the 402 challenge, signs the on-chain payment, and retries automatically. See https://img402.dev/blog/paying-x402-apis for details.
這個 Skill 質量不錯,文件清晰易懂,涵蓋了免費和付費圖片託管服務,定價透明、風險提示到位。不過它功能比較單一,只提供上傳圖片獲取連結的能力,沒有示例或更詳細的使用指導。總體來說,是一個可靠但功能有限的圖片託管工具,適合需要快速分享圖片的使用者。