✓ Verified ✍️ Content Creation ✓ Enhanced Data

Image Hosting

Upload images to img402.dev and get a public URL.

Rating
4.5 (78 reviews)
Downloads
17,930 downloads
Version
1.0.0

Overview

Upload images to img402.dev and get a public URL.

Complete Documentation

View Source →

Image Hosting — img402

Upload an image to img402.dev and get a public URL. No account, no API key, no config.

Quick reference

bash
# 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:
bash
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:
bash
curl -s -X POST https://img402.dev/api/free -F image=@/path/to/image.png
  • Use the URL: The url field 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:

bash
# 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.

Installation

Terminal bash

openclaw install image-hosting
    
Copied!

💻Code Examples

# {"url":"https://i.img402.dev/aBcDeFgHiJ.png","id":"aBcDeFgHiJ","contentType":"image/png","sizeBytes":182400,"expiresAt":"2026-02-17T..."}

-urlhttpsiimg402devabcdefghijpngidabcdefghijcontenttypeimagepngsizebytes182400expiresat2026-02-17t.txt
## Workflow

1. **Get image**: Use an existing file, or generate/download one.
2. **Check size**: Must be under 1MB. If larger, resize:
example.sh
# 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..."}
example.sh
# 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

Tags

#image_and-video-generation

Quick Info

Category Content Creation
Model Claude 3.5
Complexity One-Click
Author rahulgi
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install image-hosting