Skip to content

About

AI API gateway / relay: 307 models behind one OpenAI-compatible key. image2.5 $0.0085/image, Seedance 2.0 Mini $0.01056/sec, LLM from $0.0228/M tokens. USD settlement, pay-as-you-go, $1 minimum top-up.

Topics

Resources

Contributing

Security policy

Stars

51 stars

Watchers

0 watching

Forks

Repository files navigation

Nano Banana 2 Prompts — 8 Tested Recipes With Outputs

observed unit price billing model OpenAI-compatible endpoint

Sample render via the APIMart image API

from $0.015 per image (0.5K $0.015 · 1K $0.015 · 2K $0.02) — one OpenAI-compatible endpoint at https://api.apimart.ai/v1, no monthly plan required. (observed 2026-10-12)

Get an API key · Live pricing · Model page · ⚡ 60-second quickstart

Why teams call Nano Banana 2 (gemini-3.1-flash-image-preview) through APIMart

  • One key, entire catalog. The same https://api.apimart.ai/v1 base URL and Authorization header reach Nano Banana 2 (gemini-3.1-flash-image-preview) and 300+ other image, video and language models — switch the model field, not your client.
  • $1 minimum, pay as you go. No subscription and no prepaid plan to size up front: top up from $1 and spend it on calls.
  • The charge comes back in the response. Every completed task reports the amount billed (cost / credits_cost); a task marked failed is refunded.
  • Async by design. Submit, take the task_id, poll GET /v1/tasks/{id} — batching and retries are ordinary queue work, not a bespoke integration.

Nano Banana 2 is Google's Gemini 3.1 Flash Image for fast AI image generation with native 4K output and editing.

Model id and routes

Route model value Billing Notes
Per-image gemini-3.1-flash-image-preview per delivered image, by resolution see the model page for the exact tiers

Endpoint: POST https://api.apimart.ai/v1/images/generations (OpenAI-compatible), then poll GET /v1/tasks/{task_id}.

Pricing

Output List price Effective price
default 0.01875 0.015
0.5K 0.01875 0.015
1K 0.01875 0.015
2K 0.025 0.02
4K 0.03125 0.025

Prices are a snapshot; the pricing page and data/model.json are refreshed by CI, and a completed task reports the exact amount in its cost field.

Request parameters

Field Type Default Notes
model string required the model id shown in the route table above
prompt string required what to generate, or what to change when editing
size string auto / 1:1 aspect ratio, or auto where the route supports it
resolution string 1K output resolution tier — cost scales with it
n integer 1 number of images per task, where the route allows more than one
image_urls string[] — reference images as public HTTP(S) URLs or base64 data URLs
nsfw_check boolean false runs omni-moderation-latest before submitting

The table lists the fields accepted by the APIMart OpenAI-compatible image endpoint. Check the model page for anything this model adds on top.

Quickstart

curl --request POST --url https://api.apimart.ai/v1/images/generations \
  --header "Authorization: Bearer $APIMART_API_KEY" --header 'Content-Type: application/json' \
  -d '{"model":"gemini-3.1-flash-image-preview","prompt":"A bamboo forest at sunrise, slow push-in","size":"1:1","resolution":"1K"}'
import os, time, requests

BASE = "https://api.apimart.ai/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}", "Content-Type": "application/json"}

created = requests.post(f"{BASE}/images/generations", headers=HEADERS, timeout=60, json={
    "model": "gemini-3.1-flash-image-preview", "prompt": "A bamboo forest at sunrise, slow push-in",
}).json()
task_id = created["data"]["id"]

while True:
    task = requests.get(f"{BASE}/tasks/{task_id}", headers=HEADERS, timeout=60).json()["data"]
    if task["status"] in ("completed", "failed"):
        break
    time.sleep(5)
print(task.get("cost"), task["result"]["images"][0]["url"])

Runnable versions: examples/. The task lifecycle is pending → processing → completed | failed.

FAQ

What is the Nano Banana 2 model id?

gemini-3.1-flash-image-preview. See the route table above.

How is it billed?

from $0.015 per image (0.5K $0.015 · 1K $0.015 · 2K $0.02). The completed task reports the exact amount in its cost field; a failed task is refunded.

How do I get a key?

Use the Get an API key link — $1 minimum top-up, no plan required.

Attributed links (how this repository is measured)

Purpose Attributed link Target
Model page https://go.apimart.ai/k-9c088f apimart.ai/ja/model/nano-banana-2-api
Live pricing https://go.apimart.ai/k-fd3c11 apimart.ai/ja/pricing
Get an API key https://go.apimart.ai/k-7adbdd apimart.ai/ja/keys

Outbound APIMart links are minted through the promo link API; hand-made tracking parameters are rejected by tools/check_links.py in CI.

Disclosure

Nano Banana 2 is a third-party model served through APIMart; this repository documents how to call it and publishes model ids and prices, and does not claim official status. Model names, prices and documentation belong to their respective owners.

License

MIT — see LICENSE.

About

AI API gateway / relay: 307 models behind one OpenAI-compatible key. image2.5 $0.0085/image, Seedance 2.0 Mini $0.01056/sec, LLM from $0.0228/M tokens. USD settlement, pay-as-you-go, $1 minimum top-up.

Topics

Resources

Contributing

Security policy

Stars

51 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages