Skip to content
Halaman ini belum tersedia dalam bahasa anda, jadi kandungannya dipaparkan dalam bahasa Inggeris.
Google · Nano Banana

Nano Banana 2.1 API

Generate and edit images with Nano Banana 2.1 on APISea, with 1K, 2K, and 4K output options.

Penjanaan imejImejTugas tak segerak
ID model
gemini-nano-banana-2.1

Harga API Nano Banana 2.1

Semua harga dalam USD. Kadar APISea dibandingkan dengan harga senarai rasmi bagi unit yang sama.

Jenis tokenAPISeaRasmiJimat
Input teks bagi setiap 1M token$1.32$1.50−12%
Input teks dalam cache bagi setiap 1M token$0$0—
Input imej bagi setiap 1M token$1.32$1.50−12%
Input imej dalam cache bagi setiap 1M token$0$0—
Output teks bagi setiap 1M token$6.60$7.50−12%
Output imej bagi setiap 1M token$26.40$30.00−12%

Anggaran kos bagi setiap output

PilihanAPISeaRasmi
1K≈ $0.02957$0.0336
2K≈ $0.04435$0.0504
4K≈ $0.09979$0.1134

Apakah itu Nano Banana 2.1?

Nano Banana 2.1 is Google's image generation and editing model in the Nano Banana family, available on APISea as gemini-nano-banana-2.1. Use it to create images from text descriptions or edit supplied reference images. Prompts support Chinese and English, and reference inputs can be publicly accessible image URLs or Base64 Data URLs. Output controls include 14 aspect ratios, 1K, 2K, and 4K resolution tiers, and one to four images per request.

APISea bills this model by actual token usage, rather than a fixed image fee. Estimated costs are about $0.02957 per image at 1K, about $0.04435 per image at 2K, and about $0.09979 per image at 4K; the default configuration is about 12% below the provider list price. Submit requests through the asynchronous image generation endpoint using your APISea key, then retrieve results through task queries or receive completion notifications through a webhook. APISea offers pay-as-you-go pricing and bills only successful requests.

Sorotan Nano Banana 2.1

Generate Or Edit

Create images from a text prompt or provide reference images for image-to-image generation and editing. Chinese and English prompts are supported.

Three Resolution Tiers

Choose 1K, 2K, or 4K output using the resolution parameter. The selected tier also affects billing.

Flexible Aspect Ratios

Select from 14 aspect ratios, including square, portrait, landscape, and wide formats. Set size to auto to let the model decide.

Multiple Image Outputs

Request one to four output images in a single task. Reference images support publicly accessible HTTP(S) URLs and Base64 Data URLs.

Cara memanggil API Nano Banana 2.1 dalam 4 langkah

  1. 01

    Dapatkan API key

    Log masuk ke APISea, tambah nilai sekurang-kurangnya $50 dan cipta kunci sk-sea dalam konsol.

  2. 02

    Tetapkan base URL

    Gunakan https://api.apisea.ai/v1 sebagai base URL dalam SDK atau klien HTTP anda.

  3. 03

    Hantar permintaan

    Panggil POST /v1/images/generations dengan "model": "gemini-nano-banana-2.1" dan parameter di bawah.

  4. 04

    Urus respons

    Respons mengandungi task_id. Lakukan tinjauan berkala menggunakan GET /v1/tasks/{task_id} sehingga status menjadi completed, kemudian muat turun URL hasil.

curl --request POST \
  --url https://api.apisea.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini-nano-banana-2.1",
    "prompt": "An orange cat on a wooden table beside a cup of coffee, soft morning light, realistic photography",
    "size": "16:9",
    "resolution": "2K",
    "n": 1
  }'

Parameter

ParameterJenisWajibLalaiPenerangan
modelstringWajib—Model ID: `gemini-nano-banana-2.1` or `gemini-nano-banana-2.1-ext`.
nsfw_checkbooleanPilihanfalseWhether to run content moderation before submitting the image task.
promptstringWajib—A text description for image generation or editing. Chinese and English are supported.
sizestringPilihanautoOutput aspect ratio. Supports `1:4`, `4:1`, `1:8`, `8:1`, `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, and `21:9`. Formats such as `16x9` are also accepted.
resolutionstringPilihan1KOutput resolution tier: `1K`, `2K`, or `4K`. Lowercase values are accepted. This also affects billing.
nintegerPilihan1Number of output images: 1–4 for the official version; only 1 for Ext.
image_urlsstring[]Pilihan—Reference image list. Omit for text-to-image; provide for image-to-image or editing. Each item supports:
official_fallbackbooleanPilihanfalseOnly applies to `gemini-nano-banana-2.1-ext`. When enabled, attempts to complete the task using the official version if Ext fails.
webhookstringPilihan—Callback URL notified when the task ends. See [task webhooks](/docs/tasks/webhook).

Perkara yang boleh anda bina dengan Nano Banana 2.1

Creative Asset Generation

Build a tool that turns written creative briefs into images, with selectable resolution and aspect ratio for each request.

Reference Image Editing

Let users upload a reference image and describe the edits they want. Pass the reference through image_urls alongside the editing prompt.

Multi-Format Content

Generate images in square, portrait, and landscape formats for different content placements using the size parameter.

Image Option Workflows

Request up to four images per task to give users multiple outputs to review in a creative production interface.

Petua untuk hasil yang lebih baik

  • 01

    Use Supported Resolutions

    Set resolution explicitly to 1K, 2K, or 4K. Values such as 0.5K and 512 return HTTP 400, while other unrecognized values fall back to 1K.

  • 02

    Choose Your Input Mode

    Omit image_urls for text-to-image generation; include it for reference-based generation or editing. Keep each reference image within the 20MB limit.

  • 03

    Plan For Async Results

    Store the task_id returned on submission and poll task status every 3–5 seconds. Allow at least 3 minutes for the overall wait timeout, or supply a webhook for completion notifications.

  • 04

    Budget By Token Usage

    Treat the per-image prices as estimates, not fixed fees. Actual billing depends on token usage, and the resolution tier affects cost.

Had dan perkara yang perlu diketahui

  • Requests are asynchronous; successful submission returns a task_id rather than completed images.

  • Each request supports one to four output images and reference images up to 20MB each.

  • Maximum input is 128,000 tokens, and maximum output is 16,000 tokens.

Soalan lazim API Nano Banana 2.1

How much does Nano Banana 2.1 cost on APISea?

Estimated costs are about $0.02957 per image at 1K, about $0.04435 per image at 2K, and about $0.09979 per image at 4K. Billing uses actual token usage, and the default configuration is about 12% below the provider list price.

How do I call Nano Banana 2.1 through the API?

Send a POST request to https://api.apisea.ai/v1/images/generations with your APISea key as a Bearer token. Set model to gemini-nano-banana-2.1 and provide a prompt; use the returned task_id to query status and retrieve images.

Does Nano Banana 2.1 support image editing?

Yes. Provide reference images through image_urls and describe the desired edit in prompt. References can be publicly accessible HTTP(S) URLs or Base64 Data URLs.

Which output sizes and image counts are supported?

The model supports 1K, 2K, and 4K resolution tiers, 14 aspect ratios, and one to four images per request. Actual returned images determine pixel dimensions; not every documented dimension combination has been tested.

How does this model differ from Nano Banana 2.1 Ext?

gemini-nano-banana-2.1 uses actual token billing and supports one to four images per request, while gemini-nano-banana-2.1-ext uses per-image billing by resolution tier and supports one image per request. Both offer the same output dimensions and image quality; their reference-image size limits differ.

Can I use generated images commercially?

Commercial use is subject to the provider's terms. Review the applicable terms for your intended use before publishing or distributing generated images.

Model berkaitan

Pilihan: 250+ model · Tambah nilai minimum $50

Mula membina dengan Nano Banana 2.1

Satu kunci, bayar mengikut penggunaan bermula daripada $50, hanya dicaj untuk permintaan yang berjaya.