arkennemasis Codex LLM (ChatGPT login)
GPT-5 text and vision in ComfyUI, billed to your ChatGPT plan
- image_1
- image_2
- image_3
- image_4
- text
- account
ArkCodexLLM puts the GPT-5 family - text and vision - inside your ComfyUI graph, billed against your existing ChatGPT subscription instead of an API key. Same trick as the pack's Codex Image Gen: no key field, no in-UI OAuth, it reuses the login the Codex CLI wrote. It's the LLM node the Variation pipeline's "Step 1B" step expects, and it's a perfectly good general text/vision node for anything else in a workflow that wants a frontier model without paying per token.
The setup cost is one terminal command, once:
codex login
Requires a paid ChatGPT plan - the pack is developed against ChatGPT Plus at $20/month - and the CLI must be installed and signed in on the same machine and user account that runs ComfyUI. The node reads ~/.codex/auth.json (or $CODEX_HOME/a per-node codex_home), refreshes an expired token and saves it back atomically, and names the signed-in account in its account output.
The inputs that matter
prompt- required; the user content.system_instructions- wire the pack's System Instructions node here, or type rules directly.image_1throughimage_4- optional vision inputs (can be batches). This is what makes it a VLM rather than a text box.model- the GPT-5 family, smartest first:gpt-5.6-sol,-terra,-luna, then 5.5, 5.1, 5. The tooltip is honest: availability depends on your plan; if one is refused, try the next.model_overridetakes a raw model id for anything newer than the dropdown.reasoning_effort- default through max. The tooltip's guidance is the good stuff:ultrais the Codex CLI's own workhorse and worth it for story planning, where one call decides the quality of everything downstream.defaultomits the field entirely.json_only- demand bare JSON and strip ``` fences. Turn it on whenever a downstream node parses the text; the pack's Recipe Compile step is exactly this shape, and an LLM answering with a code fence is how a pipeline breaks at 2am.batch_total+batch_size- split a long structured answer across several calls. A 16-scene plan is ~12,000 output tokens in one response, which is slow, goes silent long enough for the connection to cut, and can hit the output cap and come back truncated. Setbatch_totalwithbatch_size(default 5) and earlier items are passed forward so the story still joins up. This is the single most useful setting on the node for real work.speed-fastsendsservice_tier=priority(the CLI's "1.5x speed, increased usage"). Measured on the author's account: first token 0.75s vs 1.00s. It spends plan quota faster, so leave it standard for long batch runs.
Outputs: text (STRING) and account. Note GPT-5 models output text only - image generation is the Codex Image Gen node's job.
Installing and gotchas
Part of comfyui-arkennemasis:
cd ComfyUI/custom_nodes
git clone https://github.com/Hishamahmer/comfyui-arkennemasis
pip install replicate httpx
restart, under arkennemasis/LLM. Like all the Codex nodes, it needs httpx to load and a live CLI login to run.
Where people get burned: long single-call JSON plans (use batching - it's there for exactly the truncation you'll hit), and forgetting that one at a time run_mode serialises every arkennemasis API node in the graph. If your image gens are queueing behind a slow planning call, that's the lock doing its job; give the planner its own graph or accept the serialisation.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| system_instructionsopt | STRING | The role/rules for the model. Wire the 'System Instructions' node here, or type it directly. | |
| image_1opt | IMAGE | Optional image to look at. Can be a batch. | |
| batch_keysopt | STRING | Optional JSON array of the item keys being asked for. When supplied, batching slices by these keys instead of by scene number, each batch names the exact keys it must return, and the numbering is NOT re-stamped — so the caller can match results by key rather than by position. | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| modelopt | COMBO | Smartest first. Availability depends on your ChatGPT plan; if one is refused, try the next. | |
| model_overrideopt | STRING | Raw model id, used INSTEAD of the dropdown when not blank. For models newer than this node. | |
| reasoning_effortopt | COMBO | How hard the model thinks before answering. Levels above 'high' are what the Codex CLI itself uses on this machine - 'ultra' is its workhorse, 'xhigh' and 'max' are rarer. Use 'ultra' for story planning, where one call decides the quality of everything downstream. 'default' omits the field entirely. | |
| json_onlyopt | BOOLEAN | false | Demand bare JSON and strip any ``` fences from the answer. Turn on when a downstream node parses the text. |
| codex_homeopt | STRING | Folder holding auth.json. Blank = CODEX_HOME, else ~/.codex. Give each ChatGPT account its own folder and point here to switch account. | |
| allow_refreshopt | BOOLEAN | true | Refresh an expired token and save it back. Off = fail instead of writing to auth.json. |
| timeout_secondsopt | INT | 6000–86400 | 0 = wait indefinitely. Planning a long scene list with high effort can take minutes. |
| force_rerunopt | BOOLEAN | false | Call again even if inputs are unchanged. |
| run_modeopt | COMBO | ComfyUI runs async nodes concurrently. 'one at a time' serialises every arkennemasis API node in the graph. | |
| max_concurrentopt | INT | 20–32 | Only used when run_mode is 'all at once': how many arkennemasis API calls may be in flight together. 0 = no cap. |
| batch_totalopt | INT | 00–500 | How many items the answer must contain in total (scene count). 0 = ask for everything in one call, the old behaviour. Set this WITH batch_size to split a long JSON answer across several short calls. A 16-scene plan is ~12,000 output tokens in one response, which is slow, goes silent long enough for the connection to be cut, and can hit the output cap and come back truncated. |
| batch_sizeopt | INT | 51–100 | Items per call when batch_total is set. 5 keeps each call to a few thousand tokens, so it answers in well under a minute and cannot be truncated. Earlier items are passed forward so the story still joins up. |
| speedopt | COMBO | The Codex CLI's own Speed setting. 'fast' is its '1.5x speed, increased usage' option and sends service_tier=priority; 'standard' sends the default tier. Measured on this account: first token 0.75 s vs 1.00 s, whole short answer 1.7 s vs 3.2 s. It spends your plan's quota faster, so leave it on standard for long batch runs. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| account | STRING | — |