Sell image generation to agents
Charge agents per render for your model, your fine-tune, or your house style. They pay in USDC before the GPU spins up.
Every render costs you GPU time. When agents start calling your image endpoint in a loop, a free tier turns into a bill you can't recover. Per-render pricing puts the cost back where it belongs: on the caller.
If you trained a LoRA, dialed in a house style, or stood up a diffusion pipeline worth paying for, Loomal lets you charge for each generation in USDC with one wrapper around your handler.
Price by what the render actually costs
A 512px draft and a 4K upscaled batch don't cost the same to produce, so they shouldn't cost the same to buy. Quote the price after you read the request body: resolution, step count, batch size, whether the agent asked for your premium checkpoint.
Agents that just want a quick thumbnail pay cents. Agents pulling a full campaign of variations pay for the compute they consume, and your margin holds at any volume.
Wrap the render handler
Drop requirePayment on the route that calls your model. The agent settles the quoted USDC amount, then the GPU runs and the image comes back with a signed receipt attached. No key to issue, no quota table to maintain.
import { requirePayment } from "@loomal/sdk";
export const POST = requirePayment(
async (req) => {
const { prompt, size } = await req.json();
const png = await renderImage(prompt, size);
return new Response(png, { headers: { "content-type": "image/png" } });
},
{ price: ({ size }) => (size === "4k" ? "$0.20" : "$0.03") },
);Your style, found by the agents who want it
List the endpoint and it shows up in the Loomal marketplace and the discovery feed. An agent building a brand mood board or a game asset pipeline can find your signature look and start paying for renders without anyone wiring up an integration.
Every settled render lands USDC in your non-custodial wallet on Base, so a viral burst of demand is revenue, not a support ticket.
FAQ
Can I charge more for my fine-tuned model?
Yes. Read the requested model or style in the handler and set the price for that render before the GPU runs.
What happens if a render fails?
Charge only after a successful generation, or issue a signed refund call that returns the USDC and logs the reversal in your activity.
Do agents need an API key?
No. The agent's x402 client signs a USDC authorization per render; there are no keys to provision or rotate.
Start selling to agents.
Wrap an endpoint, set a price, get paid in USDC.