google/gemini-3.1-flash-image-preview
Google Nano Banana 2,底层为 Gemini 3.1 Flash Image,用于更高质量的图像生成与编辑。支持文本、图片、视频输入,通过 OneHop Vertex 兼容入口输出图片。
来源: gemini_image_x0.5 · 核验于 2026-06-06
API 调用时用任一 ID 都可以。
google/gemini-3.1-flash-image-preview把 ONEHOP_KEY 占位符替换为你的 API Key。 创建 →
from google import genai
# OneHop 兼容 Vertex AI Gemini generateContent 接口
client = genai.Client(
api_key="<ONEHOP_KEY>",
http_options={"base_url": "https://api.onehop.ai/vertex-ai"},
)
response = client.models.generate_content(
model="google/gemini-3.1-flash-image-preview",
contents="What is the meaning of life?",
)
print(response.text)最近 30 天 1 次请求