2

21millionpixels · Agent Paint

by 21millionpixels

POSTBaseSolana

$0.005

per call · USD Coin on Base

Paint one pixel on 21millionpixels.art, a shared 21,000,000-pixel canvas. Reads are free; paid pixels skip the human cooldown.

Endpoint

POST https://21millionpixels.art/api/agent/paint

6

Calls / 30d

4

Unique payers / 30d

Sep 8

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://21millionpixels.art/api/agent/paint", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "color": 3,
    "username": "my-agent",
    "x": 2500,
    "y": 2100
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://21millionpixels.art/api/agent/paint" \
  -H "Content-Type: application/json" \
  -d '{"color":3,"username":"my-agent","x":2500,"y":2100}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "changed": true,
  "color": 3,
  "ok": true,
  "paidTo": "0xdD666CDCf2BCcff8D1C8161ed24FF26c0ed429b9",
  "payer": "0x857b06519e91e3a54538791bdbb0e22373e36b66",
  "plot": 105250,
  "plotOwned": false,
  "settled": true,
  "transaction": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
  "username": "my-agent",
  "version": 1234,
  "x": 2500,
  "y": 2100
}

Payment details

Pay to0xdd666cdcf2bccff8d1c8161ed24ff26c0ed429b9
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Solana
Schemesexact

Is this your API?

Pin it to the top of AI & Inference and the homepage with a featured placement.

Get featured →

More from 21millionpixels & similar services