Skip to content
Fourohtwo

Make an image smaller in bytes

image.kagurazaka.dev/v1/compress

Make an image smaller in bytes: re-encode it (mozjpeg for JPEG, palette quantization for PNG) with metadata removed, optionally scaled down to a maximum width or converted, and report how much was saved.

BaseAnswering
POSThttps://image.kagurazaka.dev/v1/compress

Uptime100% of 2 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://image.kagurazaka.dev/v1/compress", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"max_width":1600,"quality":70,"url":"https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg"}),
});
console.log(await res.json());

Example input

{
  "max_width": 1600,
  "quality": 70,
  "url": "https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg"
}

More from x402 Image ToolsProvider status