Skip to content
Fourohtwo

x402-gateway.blackwoodstate8.workers.dev/v1/image-gen

Use when you need image generation, an AI image generator or text to image from a prompt for illustrations, mockups or social posts. Do not use for image edits, specific sizes, photos of real people or more than one image per call. Returns JSON with an AI-generated image from a text prompt: a 1024x1024 JPEG made by FLUX.1 schnell on Workers AI, as base64 for 0.03 USDC per call. Asynchronous: the p

BaseAnswering
POSThttps://x402-gateway.blackwoodstate8.workers.dev/v1/image-gen

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://x402-gateway.blackwoodstate8.workers.dev/v1/image-gen", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"prompt":"A brass lighthouse on a dark navy sea at dusk, minimalist flat illustration","steps":4}),
});
console.log(await res.json());

Example input

{
  "prompt": "A brass lighthouse on a dark navy sea at dusk, minimalist flat illustration",
  "steps": 4
}