{"uid":"cap_CqMJxpgF3byPedapvoBMN","slug":"agent402-tools-image-generation-ee55d9f9","name":"agent402.tools Image Generation","description":"OpenAI-compatible image generation over x402 - point any OpenAI SDK's images.generate() at base_url https://agent402.tools/v1 and pay $0.08 per image in USDC, no API key, no signup. Served by Gemini 2.5 Flash Image (nano banana); prompt in (up to 4k chars), inline base64 image out (response_format b64_json). One image per call (n locked to 1). Optional zdr:true routes only to zero-data-retention providers.","url":"https://agent402.tools/v1/images/generations","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"zdr":{"type":"boolean","description":"Optional - true routes only to zero-data-retention providers"},"prompt":{"type":"string","description":"Text description of the image to generate (up to 4,000 chars)"}}},"responseSchema":{"type":"json","example":{"data":[{"b64_json":"iVBORw0KGgoAAAANSUhEUgAA…","media_type":"image/png"}],"model":"google/gemini-2.5-flash-image","usage":{"total_tokens":1304,"prompt_tokens":14,"completion_tokens":1290},"created":1750000000}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.08","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.08/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_oSDhT_aYLqemleQwMf16G","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.08","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates images from text prompts using Gemini 2.5 Flash Image, via an OpenAI-compatible API endpoint paid with USDC over x402 — no API key required.","exampleAgentPrompt":"Generate an image of a cozy Japanese tea house surrounded by cherry blossoms at dusk, with soft lantern light — pay per image in USDC via x402 with no API key.","exampleUseCases":null,"resultDescription":"Returns an image (URL or base64-encoded data) generated from the provided text prompt, consistent with the OpenAI images.generate() response format. Each call costs $0.08 USDC charged via the x402 payment protocol.","failureModes":["Prompt too long — exceeds 4,000 character limit, returns validation error","Payment failure — insufficient USDC balance or x402 handshake failure results in 402 Payment Required","Content policy violation — prompt rejected for unsafe or policy-violating content","Model unavailability — Gemini 2.5 Flash Image backend down, returns 503","Malformed request body — missing required 'prompt' field returns 400"],"whenToPreferThis":"Choose this endpoint when you need OpenAI SDK-compatible image generation, want to pay per image in USDC with no signup or API key, or are building an agent that uses x402 micropayment infrastructure. Prefer over OpenAI DALL-E or Stability AI when avoiding API key management or when the underlying Gemini 2.5 Flash Image model is preferred.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T20:29:09.242Z","isFirstParty":false}