赛博禅心

BananaPro 已发布,可通过 API & 第三方使用

BananaPro®
图像生成
推理模型
Nana-Banana Pro 的官方名称叫做: Gemini 3 Pro Image ,是专为解决最具挑战性的图像生成任务而设计,融合了最先进的推理能力。它是处理复杂和多轮图像生成及编辑的最佳模型。
核心优势: Gemini 3系列是推理模型,能够在回应前通过思考过程进行推理,从而提高准确性并增强图像质量。
增强功能: 该模型支持高达4K分辨率输出,并增加了Grounding with Search功能,提供更准确和最新的知识。
功能支持
Gemini 3 Pro Image Preview模型支持以下功能:
• 图像生成
• 多轮图像编辑
• 文本和图像交错生成
• 可配置宽高比
• 1K、2K、4K分辨率
• Grounding with Google Search(需付费)
• 批量预测
• 动态共享配额
• 预配置吞吐量
• 仅支持全局端点
API调用方法
1. 使用curl命令行(标准模式)
# 配置环境变量
MODEL_ID="gemini-3-pro-image-preview"
PROJECT_ID="YOUR_PROJECT_ID"

# 发送请求
curl -X POST \
   -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
   -H "Content-Type: application/json" \
   https://aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/global/publishers/google/models/${MODEL_ID}:generateContent \
   -d '{
     "contents": {
       "role": "user",
       "parts": {
         "text": "Generate a hyper-realistic infographic of a gourmet cheeseburger, deconstructed to show the texture of the toasted brioche bun, the seared crust of the patty, and the glistening melt of the cheese."
       }
     },
     "generation_config": {
       "response_modalities": ["TEXT", "IMAGE"]
     }
   }'
2. 使用Python SDK(标准模式)
# 安装SDK
pip3 install --upgrade --user google-genai

# Python代码示例
from IPython.display import Image, Markdown, display
from google import genai
from google.genai.types import GenerateContentConfig, Part
import os

PROJECT_ID = "YOUR_PROJECT_ID"
LOCATION = "global"

client = genai.Client(vertexai=True, project=PROJECT_ID, location=LOCATION)
MODEL_ID = "gemini-3-pro-image-preview"

prompt = """
Generate a hyper-realistic infographic of a gourmet cheeseburger, deconstructed to show the texture of the toasted brioche bun, the seared crust of the patty, and the glistening melt of the cheese.
"""

response = client.models.generate_content(
   model=MODEL_ID,
   contents=prompt,
   config=types.GenerateContentConfig(
       response_modalities=['IMAGE', 'TEXT'],
       image_config=types.ImageConfig(
           aspect_ratio="16:9",
           image_size="2K",
       ),
   ),
)

# 显示图像
if response.candidates[0].finish_reason != types.FinishReason.STOP:
   reason = response.candidates[0].finish_reason
   raise ValueError(f"Prompt Content Error: {reason}")

for part in response.candidates[0].content.parts:
   if part.thought:
       continue
   if part.inline_data:
       display(Image(data=part.inline_data.data, width=1000))
3. 使用curl命令行(Express模式)
# 配置环境变量
MODEL_ID="gemini-3-pro-image-preview"
API_KEY="YOUR_API_KEY"

# 发送请求
curl -X POST \
   -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
   -H "Content-Type: application/json" \
   https://aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/global/publishers/google/models/${MODEL_ID}:generateContent \
   -d '{...}'
以及
以及...我们的大橘子同学,已经给他的 Listen Hub 网站接上了,访问https://banana.listenhub.ai/ 现在就能使用
Image
Image
其他信息
• 资源ID:gemini-3-pro-image-preview
• 发布日期:2025-11-20
• 发布阶段:Preview
• 描述:文本+图像生成
Gemini 3 Pro Image模型现已在Vertex AI和Gen AI SDK中提供,支持Python和Go语言的统一接口。了解更多模型版本差异,请参考Model versions and lifecycle文档。