Nodes/comfyui-byokey/BYOKey Gemini Image (Google)
ComfyUI Node

BYOKey Gemini Image (Google)

Generate or edit images with Google's Gemini (Nano Banana) models. Returns the generated image(s) and any accompanying text. Calls the Gemini Developer API directly with your own key.

By MeteorAndy·Created 3 months ago·Updated 2 months ago· 0
BYOKey Gemini Image (Google)
  • images
  • image
  • string
api_key
base_urlhttps://generativelanguage.googleapis.com/v1beta
prompt
modelgemini-2.5-flash-image
seed42
aspect_ratioauto
resolution1K
response_modalitiesIMAGE+TEXT
thinking_levelauto
system_promptYou are an expert image-generation engine. You must ALWAYS produce an image. Interpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition. If a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept. Prioritize generating the visual representation above any text, formatting, or conversational requests.
Categoryapi/byokey/image

Inputs (11)

NameTypeDefaultDescription
api_keySTRINGGoogle AI Studio (Gemini) API key.
base_urlSTRINGhttps://generativelanguage.googleapis.com/v1betaAPI base URL. Change only for third-party relays.
promptSTRINGText prompt describing the image to generate or the edits to apply.
modelCOMBOgemini-2.5-flash-image5 options: gemini-2.5-flash-image, gemini-2.5-flash-image-preview, gemini-2.0-flash-exp-image-generation, gemini-3-pro-image-preview, Nano Banana 2 (Gemini 3.1 Flash Image)
seedINT420–18446744073709550000Best-effort deterministic seed. By default a random seed is used.
imagesoptIMAGEOptional reference image(s). Use the Batch Images node for multiple (up to 14 for the Nano Banana Pro / 2 models).
aspect_ratiooptCOMBOauto'auto' matches the input image's aspect ratio, otherwise generates that ratio.
resolutionoptCOMBO1KTarget output resolution (only used by Nano Banana Pro / 2 models). For 2K/4K the native Gemini upscaler is used.
response_modalitiesoptCOMBOIMAGE+TEXT'IMAGE' for image-only output, 'IMAGE+TEXT' to also return a text response.
thinking_leveloptCOMBOautoDepth of the model's reasoning (Nano Banana 2 only). 'auto' leaves it unset.
system_promptoptSTRINGYou are an expert image-generation engine. You must ALWAYS produce an image. Interpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition. If a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept. Prioritize generating the visual representation above any text, formatting, or conversational requests.Foundational instructions that dictate the model's behavior.

Outputs (2)

NameTypeDescription
imageIMAGE
stringSTRING