Pay-per-second billing on Tempo. Rent compute, pay for the seconds used, get the rest back.
Ready to render
216 tiles of real CPU work, each billed for the time it takes. Stop whenever you like.
The fractal is a stand-in. Any compute or API endpoint can be billed the same way: install rivus-meter, hand the meter your work, and it quotes, times, bills and settles on its own. This is the code running behind this page, condensed.
import { createMeter } from "rivus-meter/server";
const meter = createMeter({
privateKey: process.env.PROVIDER_PRIVATE_KEY, // the account that gets paid
secret: process.env.RIVUS_SECRET,
price: "0.01", // pathUSD per second of work
deposit: "1", // what a buyer is asked to lock
});
// Your work, as an async generator. Rivus quotes the price, opens the payment
// channel, times each step, bills it, and settles when either side is done.
export const { GET, POST } = meter.route(async function* (job) {
for await (const tile of renderTiles(job.signal)) {
yield tile; // delivered to the buyer, billed for the time it took
}
});