PD: Gemini Pro Image (ComfyUI AuthToken)
Gemini Pro Image without an API key — the token-powered twin
- images
- files
- image
- text
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 -
automatches your input image. - resolution -
1K/2K/4K, with the native Gemini upscaler handling the high end. - response_modalities -
IMAGEorIMAGE+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/infooutput 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.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| auth_token | STRING | — | |
| prompt | STRING | A futuristic city with flying cars | Text prompt describing the image to generate or the edits to apply |
| model | COMBO | gemini-3-pro-image-preview | 1 options: gemini-3-pro-image-preview |
| aspect_ratio | COMBO | auto | If set to 'auto', matches your input image's aspect ratio |
| resolution | COMBO | 1K | Target output resolution. For 2K/4K the native Gemini upscaler is used |
| response_modalities | COMBO | IMAGE+TEXT | Choose 'IMAGE' for image-only output, or 'IMAGE+TEXT' for both |
| seed | INT | 420–18446744073709550000 | — |
| imagesopt | IMAGE | Optional reference image(s) (up to 14) | |
| filesopt | GEMINI_INPUT_FILES | — | |
| system_promptopt | STRING | You 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)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| text | STRING | — |