# img402.dev > img402 is an image hosting API for AI agents. Upload an image, get a public URL. Free tier: 1MB, 7-day retention, no auth. Paid tier: 5MB, 1-year retention, $0.01 USDC via x402 protocol. No accounts, no API keys. Supports PNG, JPEG, GIF, WebP. ## Docs - [API Reference](https://img402.dev/docs): Complete API documentation with quickstart, endpoints, error codes, and examples - [OpenAPI Spec](https://img402.dev/openapi.json): Machine-readable OpenAPI 3.0 specification - [Pricing](https://img402.dev/pricing): Free vs paid tier comparison ## Quickstart - Upload a free image: `curl -F image=@photo.png https://img402.dev/api/free` - Response: `{"url": "https://i.img402.dev/abc123.png", "id": "abc123", "contentType": "image/png", "sizeBytes": 12345, "expiresAt": "2026-02-15T00:00:00.000Z"}` ## Endpoints - [Free Upload](https://img402.dev/docs#free-upload): `POST /api/free` — 1MB max, 7-day retention, no auth required - [Upload Token](https://img402.dev/docs#upload-token): `POST /api/upload/token` — Pay $0.01 USDC via x402, get a 10-minute upload token - [Upload with Token](https://img402.dev/docs#upload): `POST /api/upload` — Upload with token or direct x402 payment, 5MB max, 1-year retention - [Serve Image](https://img402.dev/docs#serving): `GET https://i.img402.dev/:id.:ext` — Public CDN, Cloudflare edge-cached ## Pages - [Home](https://img402.dev): Landing page with usage examples - [Security](https://img402.dev/security): Data handling, infrastructure, content safety - [Abuse Reporting](https://img402.dev/abuse): Report prohibited content, DMCA takedowns - [Terms of Service](https://img402.dev/terms): Terms of Service - [Privacy Policy](https://img402.dev/privacy): Privacy Policy - [Blog](https://img402.dev/blog): Tutorials and articles - [How to Pay for x402 APIs](https://img402.dev/blog/paying-x402-apis): Guide to paying for x402 APIs using MCP tools, client libraries, or direct wallet signing - [How to Host Images Online in 2026](https://img402.dev/blog/image-hosting-2026): Comparing imgur, S3, GitHub, and API-first image hosts for programmatic and AI agent uploads - [OpenClaw Image Hosting Skill](https://img402.dev/blog/openclaw-image-hosting): How to add image hosting to your OpenClaw agent with the img402 skill