80trust / 100

Image

by api.x-402.online in AI models & inference

x402 APIPassing, checked 3 h ago

Turn a text prompt into a 1024x1024 JPEG in about four seconds. Text-to-image generation pay-per-call, no account and no API key: send a prompt, receive a 1024x1024 JPEG as a base64 data URL in about four seconds (FLUX.1 schnell). Photorealistic scen…

POST https://api.x-402.online/v1/image

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
236 ms typical, 284 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.x-402.online/v1/image" \
  -H "content-type: application/json" \
  -d '{"prompt":"a lighthouse on a Caribbean cliff at sunset, photorealistic"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.x-402.online%2Fv1%2Fimage
const res = await pay("https://api.x-402.online/v1/image", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"prompt":"a lighthouse on a Caribbean cliff at sunset, photorealistic"}),
});
console.log(await res.json());

Example input

{
  "prompt": "a lighthouse on a Caribbean cliff at sunset, photorealistic"
}

Example output

{
  "height": 1024,
  "image": "data:image/jpeg;base64,/9j/4AAQ…",
  "mime": "image/jpeg",
  "model": "flux-1-schnell",
  "ms": 3400,
  "width": 1024
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402225 ms$0.02
7 h agoPassed402252 ms$0.02
10 h agoPassed402194 ms$0.02
14 h agoPassed402269 ms$0.02
18 h agoPassed402284 ms$0.02
21 h agoPassed4024.0 s$0.02
25 h agoPassed402236 ms$0.02
29 h agoPassed402195 ms$0.02
32 h agoPassed402200 ms$0.02
37 h agoPassed402244 ms$0.02