Nano Banana API
Generate and edit images across all five Google Nano Banana models — Nano Banana 2 Lite ($0.0238/image), Nano Banana 2.1 ($0.03/image at 1K), Nano Banana ($0.0312), Nano Banana 2 ($0.04 at 1K), and Nano Banana Pro ($0.075 at 1K) — over one asynchronous REST API.
All five Google Nano Banana variants are active in both text-to-image and edit-image capabilities. Fixed 1K pricing applies to Nano Banana 2 Lite ($0.0238) and Nano Banana ($0.0312); resolution multipliers apply to Nano Banana 2.1 (1K/2K/4K), Nano Banana 2 (1k/2k/4k), and Nano Banana Pro (1k/2k/4k).
- Endpoints Covered
- 10
- Lowest Catalog Rate
- $0.0238/image
- Capabilities
- Edit Image, Text To Image
- Savings vs fal.ai
- Up to 80%
01 / LIVE CATALOG PRICING
Real Catalog Pricing & Dynamic Tiers
Rates below are calculated dynamically from E2X micro-cent pricing rules and default resolution/quality multipliers.
| Model & Endpoint Slug | Capability | Default Rate | Dynamic Pricing Tiers |
|---|---|---|---|
| Nano Banana 2 google/nano-banana-2/edit-image | Edit Image | $0.04/image | 1k (default):$0.04/image2k:$0.06/image4k:$0.08/image |
| Nano Banana 2 google/nano-banana-2/text-to-image | Text To Image | $0.04/image | 1k (default):$0.04/image2k:$0.06/image4k:$0.08/image |
| Nano Banana Pro google/nano-banana-pro/edit-image | Edit Image | $0.075/image | 1k (default):$0.075/image2k:$0.075/image4k:$0.15/image |
| Nano Banana Pro google/nano-banana-pro/text-to-image | Text To Image | $0.075/image | 1k (default):$0.075/image2k:$0.075/image4k:$0.15/image |
| Nano Banana google/nano-banana/edit-image | Edit Image | $0.0312/image | Fixed rate (/image):$0.0312/image |
| Nano Banana google/nano-banana/text-to-image | Text To Image | $0.0312/image | Fixed rate (/image):$0.0312/image |
| Nano Banana 2 Lite google/nano-banana-2-lite/text-to-image | Text To Image | $0.0238/image | Fixed rate (/image):$0.0238/image |
| Nano Banana 2 Lite google/nano-banana-2-lite/edit-image | Edit Image | $0.0238/image | Fixed rate (/image):$0.0238/image |
| Nano Banana 2.1 google/nano-banana-2.1/text-to-image | Text To Image | $0.03/image | 1K (default):$0.03/image2K:$0.04/image4K:$0.09/image |
| Nano Banana 2.1 google/nano-banana-2.1/edit-image | Edit Image | $0.03/image | 1K (default):$0.03/image2K:$0.04/image4K:$0.09/image |
02 / QUICKSTART CODE
SSR Code Samples (cURL, JavaScript, Python)
Submit requests directly against POST https://api.e2x.ai/v1/jobs/submit or use the official @e2x/sdk and Python e2x clients with "google/nano-banana-2.1/text-to-image".
curl -sS -X POST "https://api.e2x.ai/v1/jobs/submit" \
-H "Authorization: Bearer $E2X_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/nano-banana-2.1/text-to-image",
"input": {
"prompt": "Editorial studio photo of brushed aluminum headphones on warm limestone, soft directional daylight",
"aspect_ratio": "16:9",
"resolution": "1K"
}
}'import { E2XClient } from '@e2x/sdk';
const e2x = new E2XClient({ apiKey: process.env.E2X_API_KEY });
const result = await e2x.jobs.run({
model: 'google/nano-banana-2.1/text-to-image',
input: {
"prompt": "Editorial studio photo of brushed aluminum headphones on warm limestone, soft directional daylight",
"aspect_ratio": "16:9",
"resolution": "1K"
},
});
console.log(result.output);import os
from e2x import E2XClient
client = E2XClient(api_key=os.environ["E2X_API_KEY"])
job = client.jobs.run(
model="google/nano-banana-2.1/text-to-image",
input={
"prompt": "Editorial studio photo of brushed aluminum headphones on warm limestone, soft directional daylight",
"aspect_ratio": "16:9",
"resolution": "1K"
},
)
print(job.output)03 / API RESPONSES & WEBHOOKS
Real API Response Payloads & Error Envelope
Submission, polling, HMAC-signed webhook callbacks, and error envelopes share one consistent JSON structure across all E2X endpoints.
POST /v1/jobs/submit (Queued Response)
{
"success": true,
"data": {
"jobId": "job_01J9XK2M8N4P7Q3R5S6T8V0WXY",
"status": "pending",
"estimatedCompletionTime": 12,
"costMicroCents": 30000
},
"requestId": "req_01J9XK2M8N4P7Q3R"
}GET /v1/jobs/:jobId (Completed Output)
{
"success": true,
"data": {
"jobId": "job_01J9XK2M8N4P7Q3R5S6T8V0WXY",
"model": "google/nano-banana-2.1/text-to-image",
"status": "completed",
"progress": 100,
"output": "https://assets.e2x.ai/generated/example.png",
"outputs": [
{
"url": "https://assets.e2x.ai/generated/example.png",
"type": "image"
}
],
"failedGenerations": [],
"numberOfGenerations": 1,
"requestedCount": 1,
"successCount": 1,
"failedCount": 0,
"costMicroCents": 30000,
"refundedMicroCents": 0,
"error": null,
"createdAt": "2026-11-13T10:00:00.000Z",
"completedAt": "2026-11-13T10:00:18.000Z"
},
"requestId": "req_01J9XK2N1B2C3D4E"
}Webhook Callback Body (X-E2X-Signature HMAC-SHA256)
{
"jobId": "job_01J9XK2M8N4P7Q3R5S6T8V0WXY",
"requestId": "req_01J9XK2M8N4P7Q3R",
"status": "completed",
"output": "https://assets.e2x.ai/generated/example.png",
"error": null,
"completedAt": "2026-11-13T10:00:18.000Z"
}Verify X-E2X-Signature (HMAC-SHA256 over <X-E2X-Timestamp>.<rawBody>). Read Webhook Signature & Retry docs →
Standard Error Envelope
{
"success": false,
"error": {
"code": "CONCURRENT_JOBS_EXCEEDED",
"message": "Concurrent job limit reached for this model."
},
"requestId": "req_01J9XK2Q9W8E7R6T"
}Every non-2xx response returns success: false with error.code and error.message. Browse API error codes →
04 / INPUT SCHEMA
Input Parameter Reference
Parameters and constraints extracted directly from the live endpoint JSON schemas for covered models.
| Parameter | Type | Required | Default | Allowed Values / Constraints | Endpoints | Description |
|---|---|---|---|---|---|---|
| resolution | string | Optional | "1K" | enum: 1K, 2K, 4K | nano-banana-2.1/text-to-image, nano-banana-2/edit-image, nano-banana-2/text-to-image, nano-banana-pro/edit-image (+3 more) | Resolution |
| prompt | string | Required | — | maxLength: 50000 | All 10 endpoints | — |
| aspect_ratio | string | Optional | "1:1" | enum: auto, 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 5:4, 4:5, 21:9, 1:4, 4:1, 1:8, 8:1 | All 10 endpoints | — |
| image_urls | array | Required | — | items: 1..unbounded | nano-banana-2/edit-image, nano-banana-pro/edit-image, nano-banana/edit-image, nano-banana-2-lite/edit-image (+1 more) | — |
05 / VERIFIED SAMPLE OUTPUTS
Catalog Sample Outputs
Example media served from assets.e2x.ai generated by endpoints in this family.
06 / OPERATIONAL LIMITS
Rate Limits, Concurrency & Upload Constraints
Production enforcement limits enforced by the E2X gateway, worker dispatch, and Cloudflare R2 upload pipeline.
- Account API rate tiers
- Free: 10 req/min (100/hr, 1,000/day, 2 concurrent) · Pro: 100 req/min (5,000/hr, 50,000/day, 10 concurrent) · Enterprise: 1,000 req/min (50,000/hr, 500,000/day, 50 concurrent)
- Default per-model concurrency
- 5 concurrent jobs per user/model unless overridden per model version (`CONCURRENT_JOBS_EXCEEDED` on overflow)
- Gateway global burst protection
- 10,000 requests/minute gateway cap; fail-closed fallback limiter of 5 req/60s if Redis is unreachable
- Batch generations per job
- Maximum 16 outputs per POST /v1/jobs/submit request (`GENERATIONS_LIMIT_EXCEEDED` above 16)
- Pre-flight estimate & R2 upload limits
- POST /v1/jobs/estimate: 60 req/5 min · POST /v1/uploads/presign: 60 req/10 min, max 200 pending uploads, 10 MB images (JPEG/PNG/WEBP/GIF), 100 MB videos (MP4/WEBM)
- Webhook delivery policy
- HTTPS-only public endpoints (private/loopback SSRF blocked), 10s timeout per attempt, up to 5 attempts (0s, 1s, 4s, 16s, 64s), HMAC-SHA256 `X-E2X-Signature` header
Full per-tier quotas and retry guidance: Rate Limits & Concurrency Documentation →
07 / BENCHMARK COMPARISON
Unit-Normalized Pricing vs. fal.ai
Side-by-side comparison at default unit settings (pricing verified through 7 Oct 2026). Endpoints without a published competitor price render "—".
| Endpoint | Capability | E2X Default Rate | Source | Competitor Rate | Savings | Checked |
|---|---|---|---|---|---|---|
| google/nano-banana-2/edit-image | Edit Image | $0.04/image | fal.ai | $0.08/image | 50% | 24 Aug 2026 |
| google/nano-banana-2/text-to-image | Text To Image | $0.04/image | fal.ai | $0.08/image | 50% | 24 Aug 2026 |
| google/nano-banana-pro/edit-image | Edit Image | $0.075/image | fal.ai | $0.15/image | 50% | 24 Aug 2026 |
| google/nano-banana-pro/text-to-image | Text To Image | $0.075/image | fal.ai | $0.15/image | 50% | 24 Aug 2026 |
| google/nano-banana/edit-image | Edit Image | $0.0312/image | fal.ai | $0.039/image | 20% | 24 Aug 2026 |
| google/nano-banana/text-to-image | Text To Image | $0.0312/image | fal.ai | $0.039/image | 20% | 24 Aug 2026 |
| google/nano-banana-2-lite/text-to-image | Text To Image | $0.0238/image | fal.ai | $0.042/image | 43% | 24 Aug 2026 |
| google/nano-banana-2-lite/edit-image | Edit Image | $0.0238/image | fal.ai | $0.042/image | 43% | 24 Aug 2026 |
| google/nano-banana-2.1/text-to-image | Text To Image | $0.03/image | fal.ai | $0.15/image | 80% | 7 Oct 2026 |
| google/nano-banana-2.1/edit-image | Edit Image | $0.03/image | fal.ai | $0.15/image | 80% | 7 Oct 2026 |
08 / FAQ
Frequently Asked Questions — Nano Banana API
Verified answers reflecting live catalog models, pricing multipliers, and platform behavior.


