$0.01
per call · USD Coin on Base
Generate an AI image from a text prompt using Google Gemini 3.1 Flash Image. Returns base64-encoded PNG. Optional aspectRatio (1:1, 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 4:5, 5:4, 21:9). Backed by Google's Gemini image preview model — fast, high-quality, supports text rendering inside images.
Endpoint
POST https://nanobanana-x402.fly.dev/api/generate-image262
Calls / 30d
17
Unique payers / 30d
Sep 7
Last called
exact
Payment scheme
Call this service
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);
const res = await fetchWithPay("https://nanobanana-x402.fly.dev/api/generate-image", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"aspectRatio": "16:9",
"prompt": "A product hero image for a Telegram breach monitor, neon terminal style"
}),
});
const data = await res.json();curl -X POST \
"https://nanobanana-x402.fly.dev/api/generate-image" \
-H "Content-Type: application/json" \
-d '{"aspectRatio":"16:9","prompt":"A product hero image for a Telegram breach monitor, neon terminal style"}' \
-H "X-PAYMENT: <signed x402 payment>"Example response
{
"aspectRatio": "1:1",
"image_b64": "iVBORw0KGgoAAAANSUhEUgAA...",
"input": {
"bodyFields": {
"aspectRatio": "16:9",
"prompt": "A product hero image for a Telegram breach monitor, neon terminal style"
},
"method": "POST",
"type": "http"
},
"mime_type": "image/png",
"model": "gemini-3.1-flash-image-preview",
"ok": true
}Payment details
0x9b8a2786a3df7a7837ccfc4e792e9eb90a36f72fUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913Is this your API?
Pin it to the top of Media & Generation and the homepage with a featured placement.
More from Fly & similar services
Fly · Upload TO Ipfs
kleros-ipfs-gateway.fly.dev
Pin a file to IPFS
Fly · X Search
clink-lithium-vault.fly.dev
X/Twitter search for AI agents - live tweets via advanced search: from:user, exact phrases, #hashtags, min_faves, lang, since/until dates. Returns up to 20 newest matches with author, followers, likes, retweets, views, URL. Crypto, stocks, news, sentiment, social media monitoring, trend tracking, brand mentions, breaking news, memecoins, AI agents. ?query=<advanced search>. Want an AI-written trend summary too? /x/digest $0.02.
Fly · X Profile
clink-lithium-vault.fly.dev
X/Twitter profile lookup for AI agents - full public account details for any handle, no API key or login. Returns display name, user id, bio, follower and following counts, tweet count, verified status, location, join date and profile URL. Verify an account is real, size an audience, enrich a lead, resolve a handle to an id. ?username=elonmusk. Their tweets: /x/user $0.006. Find accounts: /x/users $0.006.