Image generation guide
Nano Banana API & Pro (2K/4K): image key setup
Use the Nano Banana API and Nano Banana Pro API on AngelAPI to generate crisp images at standard, 2K, and 4K resolutions with one prepaid Nano Banana API key. Every image variant charges a flat prepaid token price per picture, making costs predictable for design workflows, ecommerce thumbnails, and AI agents.
Live Nano Banana models and per-image costs
Instead of unpredictable token metering per pixel, AngelAPI publishes exact per-image costs derived from live /api/pricing rates at RM0.112 per million prepaid units:
| Model ID | Type | Status | Tokens per unit | MYR per unit (RM0.112/1M) |
|---|---|---|---|---|
nano-banana | Image | online | 2.05M / image | RM0.23 / image |
nano-banana-pro | Image | online | 6.05M / image | RM0.68 / image |
nano-banana-pro-2k | Image | online | 7.75M / image | RM0.87 / image |
nano-banana-pro-4k | Image | online | 11.75M / image | RM1.32 / image |
How to get your Nano Banana API key in three steps
- Register an AngelAPI account with email, Google, or Telegram.
- Choose a prepaid token pack on Pricing—even the RM1.12 pack (10M tokens) is enough to generate several standard
nano-bananatest images. - Copy your API key from your authenticated dashboard, set
ANGELAPI_KEYin your terminal, and callPOST https://api.angelapi.cc/v1/images/generations.
Code examples: curl, Python, and Node.js
The gateway returns base64-encoded PNG image data inside data[0].b64_json. Swap the model field between standard Nano Banana (RM0.23/image) and 4K Pro (RM1.32/image) at any time without changing code structure.
curl https://api.angelapi.cc/v1/images/generations \
-H "Authorization: Bearer $ANGELAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana",
"prompt": "Studio product photography of a matte ceramic coffee dripper on dark stone",
"size": "1024x1024"
}'import base64, os
from openai import OpenAI
client = OpenAI(
base_url="https://api.angelapi.cc/v1",
api_key=os.environ["ANGELAPI_KEY"],
)
result = client.images.generate(
model="nano-banana",
prompt="Studio product photography of a matte ceramic coffee dripper on dark stone",
size="1024x1024",
)
with open("output.png", "wb") as f:
f.write(base64.b64decode(result.data[0].b64_json))import { writeFileSync } from "node:fs"
const res = await fetch("https://api.angelapi.cc/v1/images/generations", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ANGELAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "nano-banana",
prompt: "Studio product photography of a matte ceramic coffee dripper on dark stone",
size: "1024x1024",
}),
})
const data = await res.json()
writeFileSync("output.png", Buffer.from(data.data[0].b64_json, "base64"))Image-per-pack budgeting, sizes, and MCP setup
Knowing how many images each prepaid pack yields helps teams plan batch creative workflows without budget surprises:
- 10M starter pack (RM1.12): Covers up to 4 images on standard
nano-banana(2.05M per image), or 1 initial test frame on Nano Banana Pro (6.05M) or Pro 2K (7.75M). - 100M pack (RM11.18): Delivers approximately 48 standard Nano Banana images, 16 Nano Banana Pro images, 12 Pro 2K images, or 8 full 4K Pro exports—allowing you to iterate drafts at standard cost before rendering hero frames in 4K.
- Supported dimensions & editing: Pass standard aspect hints such as
1024x1024(square),1024x1536(portrait), or1536x1024(landscape). When using hosted MCP tools athttps://panel.angelapi.cc/mcpinside Cursor, Claude Code, or Claude Desktop, call freelist_media_modelsfirst to verify live image options and then invokegenerate_imageoredit_imagewith HTTPS or data-URL reference pictures.
Practical prompting and production asset workflows
Consistent framing saves more prepaid tokens than squeezing prompt length awkwardly. When building product pages, social thumbnails, or UI storyboard concepts through the Nano Banana API, follow a three-stage workflow: test lighting, subject geometry, and framing composition on standard nano-banana (2.05M tokens, ~RM0.23) until two consecutive runs match your composition layout, then freeze the seed concepts inside your application and upgrade only the final chosen prompt to Nano Banana Pro 2K (7.75M) or Pro 4K (11.75M) for export.
Notice that AngelAPI deducts prepaid tokens strictly for completed image generations rather than idle account seat charges. That makes Nano Banana practical inside automation pipelines—such as generating blog hero artwork on CMS publish webhooks, producing clean product studio mockups for Malaysian e-commerce listings in Ringgit, or letting developers invoke generate_image on demand inside Cursor and Claude Code via MCP without maintaining multiple billing accounts across standalone creative apps.
Troubleshooting Nano Banana API errors
- 402 Insufficient token balance: Remember Pro 4K draws 11.75M prepaid units per request—larger than the 10M starter pack—so check your remaining token balance in Account before running 4K batches.
- Wrong endpoint error: Do not send Nano Banana IDs to
/v1/chat/completions; route direct REST image requests strictly toPOST https://api.angelapi.cc/v1/images/generations. - Comparing other image models: See all 30 live image routes (including GPT Image low/medium/high tiers and Wan 2.7 Image Pro) inside the full models directory or test visually inside Playground.
Frequently asked questions
How is a Nano Banana API image billed on AngelAPI?
Nano Banana models bill a fixed token count per generated image rather than word multipliers—from 2.05M tokens (about RM0.23) for standard Nano Banana up to 11.75M tokens (about RM1.32) for Nano Banana Pro 4K.
How do I get a Nano Banana API key?
Create a free AngelAPI account at /signup, buy any prepaid token pack (starting at RM1.12 for 10M tokens), and reveal your API key inside /account.
What resolution should I start testing with?
Start prompt iteration on standard Nano Banana or Nano Banana Pro (1K) before switching the model ID to 2K or 4K for final exports.
Can I run Nano Banana through MCP instead of writing REST code?
Yes. Connect https://panel.angelapi.cc/mcp in Claude Code, Cursor, or Claude Desktop using Bearer auth to use generate_image and edit_image tools directly.