NA - Verify API Key
The Two-Second Check Before You Burn a Single Credit
- status
Every node in the Neural Atelier pack lives or dies on one thing: a valid Google Gemini API key. And the pack's own nodes don't fail gracefully when yours is wrong - they shrug and hand you a 64×64 black image with an error buried in the log output. NA - Verify API Key exists to stop that frustration before it starts. Feed it your key and it tells you, in plain text, whether that key will actually work.
How it works: it does exactly one thing - creates a genai.Client with your key and calls models.list() against Google's API. If Google lets you list models, the key is valid; if not, you get a status string saying why: Invalid Key, Quota Exceeded, Permission Denied, or No API Key Configured if you left the field empty. It's the same check the pack's frontend "Verify API Key" button performs under the hood (that one posts to the pack's /neural_atelier/verify_api route), so a green light here means the bigger nodes will run. And unlike image generation, listing models is free - this node can't run up your bill.
It's genuinely useful to drop into a workflow as a gate: verify the key first, only then hand execution to the SketchToPhoto or Recolor node.
Inputs and output:
gemini_api_key(required, string) - paste your key, or leave it blank to test theGEMINI_API_KEYenvironment variable the pack also supports.status(output, STRING) - the verdict:Valid: API key verified successfullyor the specific failure. Wire it to any text display node to read it.
Install - identical to the rest of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/valsecchi75/comfyui_neural_atelier
cd comfyui_neural_atelier && pip install -r requirements.txt
or install via ComfyUI Manager (search "Neural Atelier"), then restart ComfyUI. Requirements are just google-genai, Pillow, torch, numpy; there's nothing to download from the pack itself.
Where people get tripped up: this is a network call, so a dead internet connection or a flaky proxy shows up as a generic error, not an "invalid key" message - worth ruling out before you blame your key. Also, a valid key is not the same as a paid key: models.list() succeeding doesn't mean you have image-generation quota left, so treat "Valid" as necessary-but-not-sufficient. And it's worth repeating the pack's security note: API keys are never written to disk, and run logs redact auth data, so checking your key here won't leak it into your ComfyUI output folder.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| gemini_api_key | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| status | STRING | — |