# img402.dev > img402 is an image hosting API for AI agents. Upload an image, get a public URL. Images 1MB or under: FREE and PERMANENT, no auth. Images up to 10MB: free for 30 days, or permanent for $0.01 USDC via x402. 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": null}` (expiresAt is null for images ≤1MB — they are permanent; 1-10MB free uploads get a 30-day timestamp) ## Endpoints - [Free Upload](https://img402.dev/docs#free-upload): `POST /api/free` — 10MB max, no auth required. Images ≤1MB are PERMANENT (no expiration); 1-10MB images last 30 days. - [Upload Token (permanent)](https://img402.dev/docs#upload-token): `POST /api/upload/token` — Pay $0.01 USDC via x402, get a 10-minute upload token. Resulting image is PERMANENT (no expiration). See Terms for the 90-day shutdown-notice commitment. - [Upload Token (legacy $1)](https://img402.dev/pricing): `POST /api/upload/token/permanent` — Legacy route; identical permanent hosting now costs $0.01 at /api/upload/token. Still works for backward compatibility. - [Upload with Token](https://img402.dev/docs#upload): `POST /api/upload` — Upload with token or direct x402 payment, 10MB max. All paid uploads are permanent. - [Serve Image](https://img402.dev/docs#serving): `GET https://i.img402.dev/:id.:ext` — Public CDN, Cloudflare edge-cached - [Feedback](https://img402.dev/api/feedback): `POST /api/feedback` — Tell us what you wish img402 did (free, no auth). JSON `{"feedback": "...", "contact": "..."}` (contact optional, for follow-up). A person reads every one. ## 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 - [Contact](https://img402.dev/contact): General inquiries, partnerships, support - [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 - [Images Under 1MB Are Now Free and Permanent](https://img402.dev/blog/free-permanent-image-hosting): The 2026-06 pricing change — free permanent under 1MB, $0.01 permanent up to 10MB - [Permanent Image Hosting for AI Agents](https://img402.dev/blog/permanent-image-hosting): Evergreen guide — free permanent under 1MB, $0.01 permanent up to 10MB, expiresAt:null as the programmatic signal - [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