Banana2 ?
圖像生成
推理模型
Nana-Banana 2 的官方名稱叫做: 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/ 現在就能使用
![]()
![]()
其他信息
? 資源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文檔。
特別聲明:以上內容(如有圖片或視頻亦包括在內)為自媒體平臺“網易號”用戶上傳并發布,本平臺僅提供信息存儲服務。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.