{
  "id": 6017434,
  "title": "I built a pay-per-call image processing API that AI agents can pay for with USDC",
  "url": "https://urgent.news/2026/09/06/i-built-a-pay-per-call-image-processing-api-that-ai-agents-can-pay",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-06T18:54:05.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/marcuschen-dev/i-built-a-pay-per-call-image-processing-api-that-ai-agents-can-pay-for-with-usdc-3b6e"
  },
  "original_language": "en",
  "account": "A pay-per-call image processing API was developed by the author, allowing AI agents to make payments in USDC via the Base blockchain. The API, named Image Toolkit, offers four operations: resize, convert, compress, and thumbnail, each costing 0.01 USDC. To use the API, developers POST JSON containing an image in base64 format to a specified URL. If payment is not made, a 402 response is returned with payment requirements. Upon payment, the image is processed and returned as base64. The payment process is facilitated by PayAI, and the API is discoverable through agent frameworks like agent402.tools and x402scan. The API is currently in its early stages, with no paying callers yet, but the author hopes to gather feedback from the developer community to improve the service. The API is built using Python's standard library, Pillow, and a Caddy server with TLS enabled, running on a minimal $4 VPS.",
  "summary": "I keep experimenting with the x402 protocol — HTTP 402 payment-gated APIs where AI agents pay per call in USDC on Base, no accounts or API keys. Yesterday it was QR codes; today it's image processing. Image Toolkit does four operations, 0.01 USDC each: resize — scale to width/height (aspect preserved if you pass only one) convert — PNG / JPEG / WebP compress — quality 1-95 (JPEG/WebP) thumbnail —…",
  "key_points": [
    "Image Toolkit API allows AI agents to pay for image processing services in USDC on Base blockchain.",
    "Four operations (resize, convert, compress, thumbnail) available at $0.01 USDC per call.",
    "API built with Python, Pillow, and Caddy server on $4 VPS, awaiting community feedback."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}