Nodes/comfyui-PD_comfy-api-node/PD: Gemini Pro Image (ComfyUI AuthToken)
ComfyUI Node

PD: Gemini Pro Image (ComfyUI AuthToken)

Gemini Pro Image without an API key — the token-powered twin

By 7BEII·Created 10 months ago·Updated 9 days ago· 2
PD: Gemini Pro Image (ComfyUI AuthToken)
  • images
  • files
  • image
  • text
auth_token
promptA futuristic city with flying cars
modelgemini-3-pro-image-preview
aspect_ratioauto
resolution1K
response_modalitiesIMAGE+TEXT
seed42
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.

Every model in the comfyui-PD_comfy-api-node pack comes in two auth flavors, and Gemini Pro Image is no exception. This one is the AuthToken twin of PD: Gemini Pro Image (ComfyUI Key): same flagship Gemini 3 Pro Image engine, same proxy, same up-to-14-reference-image capability - but you authenticate with a browser session token instead of a minted API key.

When the token route makes sense

The API key path is Comfy's recommended one, and it's what the README steers you to. The token path is the "I already have a logged-in ComfyUI account and don't want to manage another credential" option. You grab the auth_token_comfy_org JWT from your session using the pack's bundled Tampermonkey userscript (temperay/PD_comfyui_token_grabber.user.js), log in, and the script lifts the token out of the app's localStorage and copies it. Paste it into auth_token and the node sends it as Authorization: Bearer <token>.

There's a real trade here, and with a flagship model it matters more than with the cheap ones: a token is a login credential with your full account's permissions, it expires, and if it stops working mid-batch the node will just error. If you're generating a handful of images tonight, fine. If you're building a reusable pipeline or sharing workflows, the key variant is the less fragile choice.

Inputs

They mirror the API key version exactly:

  • auth_token - the grabbed session token.
  • prompt - generation or edit instructions; this model rewards detail.
  • model - locked to gemini-3-pro-image-preview.
  • aspect_ratio - auto matches your input image.
  • resolution - 1K/2K/4K, with the native Gemini upscaler handling the high end.
  • response_modalities - IMAGE or IMAGE+TEXT.
  • seed - present, stochastic in practice.
  • images (up to 14), files, system_prompt.

Outputs: image and text - same as the key version, with the model's textual response separate from the picture.

Installing and gotchas

cd ComfyUI/custom_nodes
git clone https://github.com/7BEII/comfyui-PD_comfy-api-node.git

Restart, find it under PD_Tools/Image_Generation. The README's pip install -r requirements.txt is a no-op (no such file); the pack's real dependency, ComfyUI's official API nodes, ships with Desktop.

Troubleshooting is the token twin's own genre:

  • 401/403 - expired token. Re-run the grabber.
  • Black output - the error placeholder; the message in the text/info output is what matters.
  • Token in shared workflows - remember a pasted token is a credential. Don't share a workflow that has one baked in.

If the model's what you want but the token dance feels fragile, the ComfyUI-key sibling gives you the same engine with a credential that doesn't rot.

CategoryPD_Tools/Image_Generation

Inputs (10)

NameTypeDefaultDescription
auth_tokenSTRING
promptSTRINGA futuristic city with flying carsText prompt describing the image to generate or the edits to apply
modelCOMBOgemini-3-pro-image-preview1 options: gemini-3-pro-image-preview
aspect_ratioCOMBOautoIf set to 'auto', matches your input image's aspect ratio
resolutionCOMBO1KTarget output resolution. For 2K/4K the native Gemini upscaler is used
response_modalitiesCOMBOIMAGE+TEXTChoose 'IMAGE' for image-only output, or 'IMAGE+TEXT' for both
seedINT420–18446744073709550000
imagesoptIMAGEOptional reference image(s) (up to 14)
filesoptGEMINI_INPUT_FILES
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 an AI's behavior

Outputs (2)

NameTypeDescription
imageIMAGE
textSTRING