scenario-gemini-image

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Scenario Gemini Image

Scenario Gemini Image

Overview

概述

Gemini, Google's image family on Scenario (the Nano Banana line), generates and edits through one required
prompt
: edits are instructions against the references, never mask painting. Discover members with
search
and treat
model_schema_get
as the contract: the creative fields are shared and nearly everything else is per member.
Connection and the core loop: see the
scenario
skill in this repo; model-agnostic image work: the
scenario-image
skill. Gemini video belongs to the
scenario-gemini-omni
skill; Gemini speech models are the audio domain. If a sibling skill named here is missing from your available skills, ask the user to install it (
npx skills add scenario-labs/skills --skill <name>
); unattended, proceed from tool schemas and flag the gap.
Gemini是Google在Scenario平台上的图像模型系列(即Nano Banana产品线),通过一个必填的
prompt
进行生成和编辑:编辑操作是基于参考图的指令,而非蒙版绘制。可通过
search
查找模型成员,将
model_schema_get
视为约定:创意相关字段是通用的,其余几乎所有字段都是各模型成员专属的。
连接与核心流程:参见本仓库中的
scenario
skill;与模型无关的图像处理工作:参见
scenario-image
skill。Gemini视频功能属于
scenario-gemini-omni
skill;Gemini语音模型属于音频领域。如果你的可用skill列表中缺少此处提到的同系列skill,请让用户安装(命令:
npx skills add scenario-labs/skills --skill <name>
);若处于无人值守模式,可根据工具schema继续操作并标记缺失项。

Quick reference

快速参考

Three members at authoring time (per-member facts move, so read the schema):
MemberResolutionSets it apart
3.1 Flash
512
to
4K
, default
1K
video input, four
thinkingLevel
steps, Search grounding
3.0 Pro
1K
to
4K
, default
2K
built for complex instruction edits and multi-image fusion
3.1 Litefixed 1K, no
resolution
fastest and cheapest;
thinkingLevel
is
MINIMAL
or
HIGH
Shared fields:
referenceImages
(up to 14, an array even for one),
numOutputs
(1 to 4 variations of one prompt),
aspectRatio
(
21:9
through
9:16
plus the default
auto
; pin the ratio when a placement demands one), and a prompt cap near 250000 characters, so a full brief fits verbatim. Flash alone takes
video
(one clip, about 15 MB, sampled at
videoFps
, default 1 fps) to pull stills from footage;
video
and
referenceImages
are mutually exclusive.
useGoogleSearch
(Flash and Pro) grounds the run in live web context and moves the price, like every field marked
cost_impact
. No mask, seed, or negative-prompt field exists: regional edits are sentences, and reruns give variations, not reproductions.
本文撰写时有三个模型成员(各模型的参数可能会变动,请以schema为准):
模型成员分辨率核心特点
3.1 Flash
512
到
4K
,默认
1K
支持视频输入、四级
thinkingLevel
、Search grounding
3.0 Pro
1K
到
4K
,默认
2K
专为复杂指令编辑和多图融合设计
3.1 Lite固定1K,无
resolution
字段
速度最快、成本最低;
thinkingLevel
仅支持
MINIMAL
或
HIGH
通用字段包括:
referenceImages
(最多14张,即使只有1张也需用数组格式)、
numOutputs
(单个prompt生成1到4个变体)、
aspectRatio
(支持
21:9
到
9:16
,默认
auto
;如果有固定排版需求请指定比例),prompt长度上限接近250000字符,因此可以完整放入整份需求说明。仅Flash版本支持
video
字段(单个视频片段,约15MB,按
videoFps
采样,默认1fps)用于从视频中提取静帧;
video
与
referenceImages
互斥。
useGoogleSearch
(仅Flash和Pro支持)基于实时网络上下文为生成结果提供事实依据,和所有标记为
cost_impact
的字段一样,会影响费用。模型不支持mask、seed或negative-prompt字段:区域编辑通过自然语言句子描述,重新运行会生成变体,而非完全复刻的结果。

Write instructions, not tags

编写指令,而非标签

Describe subject, setting, and style in plain sentences. For edits, state the change and what must survive it: "keep the shoe's shape, colors, and branding unchanged; place it on a sunlit deck". With several references, assign roles by position ("image 1 is the character's face, image 2 the outfit, image 3 the background style"); unassigned references blur together. Lock identity explicitly: say the features must be preserved while pose, lighting, or scene changes. Quote in-image copy exactly and say where each block sits ("the title reads 'LUMEN', top third"); unquoted wording is treated as a theme to depict, not copy to render. When one word keeps mangling, do not rerun the design: pass the keeper in
referenceImages
and spell the word letter by letter ("the title reads 'LUMEN', spelled L, U, M, E, N"), changing nothing else. On Flash and Lite,
thinkingLevel
defaults to
HIGH
, the careful setting; drop to
MINIMAL
for speed on simple runs.
用平实的句子描述主体、场景和风格。如果是编辑任务,说明需要修改的内容以及必须保留的部分,例如:「保持鞋子的形状、颜色和品牌标识不变,将其放置在阳光照射的甲板上」。如果有多张参考图,按位置分配角色(例如:「图1是角色的脸部,图2是服装,图3是背景风格」);未分配角色的参考图会被混合在一起。如需锁定身份,请明确说明:要求在姿势、光线或场景变化时保留特征。请准确引用图中的文字内容,并说明每个文字块的位置(例如:「标题为'LUMEN',位于画面上三分之一处」);未加引用的文字会被视为需要描绘的主题,而非需要原样渲染的文字。如果某个单词一直生成错误,不要重新运行整个设计:将效果合格的图片放入
referenceImages
,然后逐字母拼写该单词(例如:「标题为'LUMEN',拼写为L, U, M, E, N」),其余内容保持不变。在Flash和Lite版本中,
thinkingLevel
默认为
HIGH
(精细模式);对于简单任务,可调低至
MINIMAL
以提升速度。

Price the member before the batch

批量处理前先评估模型费用

The cost cliff sits between members more than between resolutions: at authoring time the same 1K edit cost about double on Flash what Lite charged, Pro's 2K default roughly doubled it again, and Lite returned in under half the time.
dry_run=true
the same parameters on two members before any batch, and re-estimate whenever
resolution
,
numOutputs
, references, or
useGoogleSearch
change.
不同模型成员之间的费用差异远大于不同分辨率之间的差异:在本文撰写时,同样的1K编辑任务,Flash的费用约为Lite的两倍,Pro默认2K的费用又约为Flash的两倍,而Lite的生成时间还不到一半。在批量处理前,可在两个模型上使用相同参数设置
dry_run=true
进行试算;每当
resolution
、
numOutputs
、参考图或
useGoogleSearch
发生变化时,都需要重新估算费用。

Worked example: product restyle with locked identity

实操示例:锁定身份的产品风格重绘

  1. search
    with
    target="models"
    ,
    query="gemini"
    ,
    public=true
    . Video and speech members surface too; pick an image member, e.g.
    model_google-gemini-3-1-flash
    (a live hit at authoring time: re-discover each session).
  2. model_schema_get
    with that id: fields, caps, and defaults.
  3. upload_asset
    the product photo and the style reference (see the
    scenario
    skill) to get asset ids.
  4. model_run
    with that
    model_id
    ,
    dry_run=true
    , and
    parameters={"prompt": "Image 1 is the product: keep its shape, label, and colors exactly. Image 2 sets the mood: warm sunset palette, soft shadows. Place the product on a marble counter in natural window light.", "referenceImages": ["asset_a", "asset_b"], "aspectRatio": "4:5", "resolution": "2K", "numOutputs": 2}
    for the cost estimate.
  5. Repeat
    model_run
    with
    wait=false
    , then
    jobs_wait
    with the returned job id, re-called with
    pending_job_ids
    on timeout, never a second
    model_run
    .
  6. asset_display
    to review both variations,
    asset_download
    to save the pick.
  1. 调用
    search
    ,设置
    target="models"
    、
    query="gemini"
    、
    public=true
    。搜索结果会同时显示视频和语音模型成员;选择一个图像模型成员,例如
    model_google-gemini-3-1-flash
    (本文撰写时的有效ID:每次会话都需要重新查找)。
  2. 调用
    model_schema_get
    并传入该ID,获取字段、上限和默认值。
  3. 调用
    upload_asset
    上传产品照片和风格参考图(参见
    scenario
    skill),获取资源ID。
  4. 调用
    model_run
    ,传入该
    model_id
    、
    dry_run=true
    以及
    parameters={"prompt": "Image 1 is the product: keep its shape, label, and colors exactly. Image 2 sets the mood: warm sunset palette, soft shadows. Place the product on a marble counter in natural window light.", "referenceImages": ["asset_a", "asset_b"], "aspectRatio": "4:5", "resolution": "2K", "numOutputs": 2}
    ,以获取费用估算。
  5. 重复调用
    model_run
    并设置
    wait=false
    ,然后使用返回的任务ID调用
    jobs_wait
    ,如果超时则使用
    pending_job_ids
    重新调用,切勿重复发起
    model_run
    。
  6. 调用
    asset_display
    查看两个变体,调用
    asset_download
    保存选中的结果。

Common mistakes

常见错误

  • Passing
    video
    and
    referenceImages
    together on Flash: they are mutually exclusive.
  • Reaching for
    seed
    or
    mask
    : neither exists on any member; describe the edit and batch
    numOutputs
    to pick from.
  • Carrying fields across members:
    resolution
    fails on Lite,
    thinkingLevel
    on Pro,
    video
    everywhere but Flash.
  • Keyword-tag prompts: comma lists underperform; write the sentence you would give a designer.
  • Several references with no roles: outputs blend them; say which image is which by position.
  • Enabling
    useGoogleSearch
    for stylistic work: it raises cost and earns it only on factual, real-world subjects.
  • 在Flash版本中同时传入
    video
    和
    referenceImages
    :二者互斥。
  • 尝试使用
    seed
    或
    mask
    :所有模型成员都不支持这两个字段;请描述编辑需求,并通过
    numOutputs
    生成多个变体以供选择。
  • 跨模型成员复用字段:Lite版本不支持
    resolution
    ,Pro版本不支持
    thinkingLevel
    ,除Flash外其他版本都不支持
    video
    。
  • 使用关键词标签式的prompt:逗号分隔的列表效果不佳;请写出你会给设计师的完整句子。
  • 多张参考图未分配角色:输出结果会将它们混合;请按位置说明每张图的作用。
  • 为风格类任务开启
    useGoogleSearch
    :这会增加成本,仅适用于事实性、真实世界主题的任务。