Skip to content
Fourohtwo

Image tools

rengi.dev/v1/image-tools/responsive

Image tools: One image in, a responsive set out: every width in AVIF, WebP and a fallback, a ZIP of the files and a ready <picture> element with srcset, sizes, width and height. Never upscales. Full schema: https://rengi.dev/v1/image-tools/schema

BaseSolanaAnswering
POSThttps://rengi.dev/v1/image-tools/responsive

Uptime100% of 4 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://rengi.dev/v1/image-tools/responsive", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"alt":"Harbour at dusk","formats":["avif","webp","jpeg"],"imageUrl":"https://rengi.dev/samples/photo.jpg","widths":[480,800,1200]}),
});
console.log(await res.json());

Example input

{
  "alt": "Harbour at dusk",
  "formats": [
    "avif",
    "webp",
    "jpeg"
  ],
  "imageUrl": "https://rengi.dev/samples/photo.jpg",
  "widths": [
    480,
    800,
    1200
  ]
}

More from Rengi ForgeProvider status