Nano Banana API
Generate and edit images with Google's Nano Banana on APISea using text prompts and reference images.
gemini-2.5-flash-image-previewBảng giá API Nano Banana
Tất cả giá đều tính bằng USD. So sánh mức giá của APISea với giá niêm yết chính thức cho cùng đơn vị.
| Tùy chọn | APISea | Chính thức | Tiết kiệm |
|---|---|---|---|
| Mặc địnhMặc định | $0.0088 | $0.039 | −77% |
Giá tính theo mỗi hình ảnh.
Nano Banana là gì?
Nano Banana is Google's image generation model, available on APISea as gemini-2.5-flash-image-preview. It supports text-to-image creation, image-to-image workflows, and image editing with reference inputs. Optimized for quick image creation, it is suited to applications that let users generate visuals or revise existing images. Requests accept a text prompt, optional reference images, and aspect-ratio controls, with output resolution set to 1K. The preview naming indicates that the model may change.
Submit requests to POST /v1/images/generations using your APISea key. Processing is asynchronous: the initial response returns a task ID for subsequent status queries rather than a finished image. APISea Default pricing is $0.0088 per image, about 77% below the provider list price of $0.039 per image. Billing is pay-as-you-go and applies only to successful requests. The compatible alias nano-banana-ext is interchangeable with the model ID and produces identical results.
Điểm nổi bật của Nano Banana
Text and Reference Inputs
Generate images from text or supply reference images for image-to-image and editing workflows. References can be public image URLs or complete base64 Data URIs.
Aspect Ratio Controls
Choose from supported ratios including 1:1, 9:16, 16:9, and 21:9. Output resolution supports 1K, which is also the default.
Asynchronous Image Tasks
Submission returns a task ID for subsequent queries. This supports applications that track generation progress separately from request submission.
Optional Content Moderation
Enable nsfw_check to review prompts and input images with omni-moderation-latest before submission. It is disabled by default.
Cách gọi API Nano Banana trong 4 bước
- 01
Tạo API key
Đăng nhập APISea, nạp tối thiểu $50 rồi tạo key sk-sea trong bảng điều khiển.
- 02
Đặt base URL
Dùng https://api.apisea.ai/v1 làm base URL trong SDK hoặc HTTP client.
- 03
Gửi request
Gọi POST /v1/images/generations với "model": "gemini-2.5-flash-image-preview" và các tham số bên dưới.
- 04
Xử lý phản hồi
Phản hồi có chứa task_id. Gửi GET /v1/tasks/{task_id} định kỳ cho đến khi trạng thái là completed, sau đó tải xuống từ các URL kết quả.
Ví dụ request
Tài liệu: Nano banana Image Generation# model can be "gemini-2.5-flash-image-preview", or the compatible alias "nano-banana-ext"
curl --request POST \
--url https://api.apisea.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gemini-2.5-flash-image-preview",
"prompt": "A bamboo forest path under moonlight",
"size": "1:1",
"n": 1,
"image_urls": [
"https://openai-documentation.vercel.app/images/cat_and_otter.png"
]
}'Tham số
| Tham số | Loại | Bắt buộc | Mặc định | Mô tả |
|---|---|---|---|---|
model | string | Bắt buộc | gemini-2.5-flash-image-preview | Image generation model name |
nsfw_check | boolean | Tùy chọn | false | Whether to run content moderation before submitting the image task. |
prompt | string | Bắt buộc | — | Text description for image generation |
size | string | Tùy chọn | — | Image generation size |
resolution | string | Tùy chọn | 1K | Output image resolution |
n | integer | Tùy chọn | — | Number of images to generate |
official_fallback | boolean | Tùy chọn | false | Whether to use the official channel fallback |
image_urls | array | Tùy chọn | — | List of reference image URLs for image-to-image or image editing |
Bạn có thể xây dựng gì với Nano Banana
Image Creation Interfaces
Build a prompt-driven image generator with selectable aspect ratios and task-status tracking.
Reference-Based Editing
Let users submit existing images with text instructions to create edited outputs through the image editing workflow.
Visual Concept Exploration
Help teams explore visual directions through separate prompt-based requests, using the model's quick-generation positioning.
Multi-Format Content Tools
Offer square, portrait, and landscape image creation for different content layouts by exposing the supported size options.
Mẹo để có kết quả tốt hơn
- 01
Choose an Explicit Ratio
Set size to a supported aspect ratio instead of auto when layout matters. For text-to-image, auto defaults to 1:1 or 16:9; for image-to-image, the ratio follows the returned response.
- 02
Keep Requests Within Bounds
Keep prompts within 1000 characters and set n to the unquoted number 1. The documented resolution option is 1K.
- 03
Validate Reference Images
Provide no more than 14 reference images, each no larger than 10MB. Base64 inputs must include the complete Data URI prefix; supported formats are JPEG, JPG, PNG, and WebP.
- 04
Track and Save Outputs
Store the returned task ID and query for the result after submission. Download generated images promptly because their links are valid for 24 hours.
Giới hạn và những điều cần biết
Generation is asynchronous and returns a task ID for subsequent queries.
Generated image links expire after 24 hours.
Each request supports one output image at 1K resolution and up to 14 reference images of at most 10MB each.
Câu hỏi thường gặp về API Nano Banana
How much does Nano Banana cost on APISea?
APISea Default costs $0.0088 per image, about 77% below the provider list price of $0.039 per image. Pricing is pay-as-you-go, with billing only for successful requests.
How do I call the Nano Banana API?
Send a POST request to https://api.apisea.ai/v1/images/generations with Bearer Token authentication, model set to gemini-2.5-flash-image-preview, and a required prompt. The response returns a task ID for subsequent queries.
Is nano-banana-ext the same model?
Yes. nano-banana-ext and gemini-2.5-flash-image-preview are interchangeable and produce identical results. The alias nano-banana instead maps to the separate official version, gemini-2.5-flash-image-preview-official.
Which image generation parameters are supported?
The endpoint accepts prompt, size, resolution, n, image_urls, nsfw_check, and official_fallback alongside model. Resolution supports 1K, n must be the number 1, and size accepts the documented aspect ratios or auto.
What are the prompt and reference image limits?
Prompts can contain up to 1000 characters. You can supply up to 14 reference images, each at most 10MB, in JPEG, JPG, PNG, or WebP format using public URLs or complete base64 Data URIs.
Can I use Nano Banana images commercially?
Commercial use is subject to the provider's terms. Review Google's applicable terms for your intended use; the supplied documentation does not establish specific commercial-use rights.
Model liên quan
gemini-2.5-flash-image-preview-official
Nano Banana Pro
gemini-3-pro-image-previewgemini-3-pro-image-preview-official
Nano Banana 2
gemini-3.1-flash-image-previewgemini-3.1-flash-image-preview-official
Nano-Banana-2-Lite
gemini-3.1-flash-lite-imagegemini-3.1-flash-lite-image-ext
Nano Banana 2.1
gemini-nano-banana-2.1Bắt đầu xây dựng với Nano Banana
Chỉ cần một key, thanh toán theo mức sử dụng từ $50; chỉ tính phí cho các request thành công.