0

0000402 · Upload

by 0000402

POSTBase

$0.02

per call · USD Coin on Base

Pay $0.02 USDC to store a file for 7 days. Send filename, optional content_type, and base64-encoded file bytes as JSON. Max file size: 10 MB. Returns a token and a stable GET URL. Network: Base Mainnet. Each request stores one file and returns a retrieval token plus expiry timestamp.

Endpoint

POST https://tempfile.0000402.xyz/upload

2

Calls / 30d

2

Unique payers / 30d

Aug 30

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://tempfile.0000402.xyz/upload", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "content_type": "image/png",
    "data_base64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQI12NgAAIABQ==",
    "filename": "chart.png"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://tempfile.0000402.xyz/upload" \
  -H "Content-Type: application/json" \
  -d '{"content_type":"image/png","data_base64":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQI12NgAAIABQ==","filename":"chart.png"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "content_type": "image/png",
  "expires_at": "2026-03-10T13:00:00+00:00",
  "filename": "chart.png",
  "message": "File stored. Available at GET /file/a1b2c3d4-e5f6-7890-abcd-ef1234567890 for 7 days.",
  "size_bytes": 12345,
  "token": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "url": "/file/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Payment details

Pay to0xee72b902af7466023595512e3359bb5bf312977c
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Media & Generation and the homepage with a featured placement.

Get featured →

More from 0000402 & similar services