80trust / 100

Image Generate

by AiSpace Venice in AI models & inference

x402 APIPassing, checked 4 h ago

Text-to-image generation on Venice models (Flux, SD3.5, GPT-Image, HunyuanImage, and more), paid per request in USDC on Base via x402, no API key. Resolve a model id from GET /api/v1/models?type=image and an optional style from GET /api/v1/image/styles.

POST https://x402.aispace.bot/api/v1/image/generate

Last 30 days

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

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://x402.aispace.bot/api/v1/image/generate" \
  -H "content-type: application/json" \
  -d '{"height":1024,"model":"flux-2-pro","prompt":"A neon-lit cyberpunk street at night, cinematic lighting, photorealistic","width":1024}'
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.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402.aispace.bot%2Fapi%2Fv1%2Fimage%2Fgenerate
const res = await pay("https://x402.aispace.bot/api/v1/image/generate", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"height":1024,"model":"flux-2-pro","prompt":"A neon-lit cyberpunk street at night, cinematic lighting, photorealistic","width":1024}),
});
console.log(await res.json());

Example input

{
  "height": 1024,
  "model": "flux-2-pro",
  "prompt": "A neon-lit cyberpunk street at night, cinematic lighting, photorealistic",
  "width": 1024
}

Example output

{
  "id": "yidY-aAgyVYbeSQfKnu4gaLS2FhTus0k",
  "images": [
    "UklGRkaBAABXRUJQVlA4IDqBAACQZwGdASoAAgACPhkMhEGhBFcvbAQAYSm3i1vP/1fFy8M/nmmzw39XzLNN9Nt+/Ez/o+YH9G/2fQs58/xP/neqj+H/6f1l"
  ],
  "request": {
    "data": {
      "embed_exif_metadata": false,
      "format": "webp",
      "height": 512,
      "hide_watermark": false,
      "model": "venice-sd35",
      "prompt": "a dot",
      "return_binary": false,
      "safe_mode": true,
      "seed": -238869555,
      "steps": 20,
      "width": 512
    },
    "success": true
  },
  "timing": {
    "inferenceDuration": 3377,
    "inferencePreprocessingTime": 3389,
    "inferenceQueueTime": 557,
    "total": 3953
  }
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
4 h agoPassed402528 ms$0.015