Nano Banana by BlockRun - Generate images using Google's Nano Banana via x402 micropayments. Use when the user asks to generate, create, draw, or make images. Pay-per-request via USDC on Base, no API keys needed.
Generate images using Google's Nano Banana model via BlockRun's x402 API. Pay-per-request with USDC on Base - no API keys needed.
Install the SDK:
pip install blockrun-llm
Get USDC on Base network:
Set your wallet private key:
# Copy .env.example to .env and add your key
cp .env.example .env
# Or export directly
export BLOCKRUN_WALLET_KEY=0x...
Network: Base (Chain ID: 8453) Payment: USDC only
from blockrun_llm import ImageClient
client = ImageClient()
result = client.generate("a cute cat wearing a space helmet")
print(result.data[0].url)
Or use the script:
python scripts/generate.py "a cute cat wearing a space helmet"
# Save to a specific directory
python scripts/generate.py "a cute cat" "google/nano-banana" "/path/to/save"
# Or use OUTPUT_DIR environment variable
OUTPUT_DIR=/path/to/save python scripts/generate.py "a cute cat"
| Model | Price | Resolution |
|---|---|---|
google/nano-banana | ~$0.05 | 1024x1024 |
google/nano-banana-pro | ~$0.10 | up to 4K |
openai/dall-e-3 | ~$0.04-0.12 | 1024x1024 to 1792x1024 |
No API keys, no subscriptions - just crypto micropayments.
Your private key NEVER leaves your machine.
The SDK uses EIP-712 typed data signing locally. Only the signature is transmitted. Same security as signing any MetaMask transaction.