Upload an image with payment and get a public URL
Upload an image with payment and get a public URL. Accepts multipart form-data (field 'image') or JSON {"file": "<base64>"}. 10MB max, permanent hosting (no expiration). PNG, JPEG, GIF, WebP.
10000 (raw units)
price
6
calls / 30d
4
unique payers
2026-09-08
updated
Provider
img402.dev · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x77f3c9bCb898Ad1d30e9a336E2cC3108d88D6c09",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "10000",
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"payTo": "9xuipz9Y13v6Z1FnLR3XkrknoBLngwUSstjxcqK6deYX",
"asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "10000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"file": "<base64-encoded-image>"
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"contentType": "image/png",
"expiresAt": null,
"id": "abc123",
"sizeBytes": 12345,
"url": "https://i.img402.dev/abc123.png"
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"properties": {
"file": {
"description": "Base64-encoded image data",
"type": "string"
}
},
"required": [
"file"
]
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"properties": {
"contentType": {
"description": "Detected MIME type",
"type": "string"
},
"expiresAt": {
"description": "ISO 8601 expiration timestamp, or null for permanent images",
"type": [
"string",
"null"
]
},
"id": {
"description": "Unique image ID",
"type": "string"
},
"sizeBytes": {
"description": "File size in bytes",
"type": "number"
},
"url": {
"description": "Public CDN URL of the hosted image",
"type": "string"
}
},
"required": [
"url",
"id",
"contentType",
"sizeBytes",
"expiresAt"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
}
}Use it
curl
curl "https://img402.dev/api/upload" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://img402.dev/api/upload");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://img402.dev/api/upload")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/6456.json, and this resource appears in /discovery/resources and /discovery/search.