Nodes/arkennemasis Nodes/arkennemasis Codex LLM (ChatGPT login)
ComfyUI Node

arkennemasis Codex LLM (ChatGPT login)

GPT-5 text and vision in ComfyUI, billed to your ChatGPT plan

By Hishamahmer·Created 2 months ago·Updated 8 days ago· 9
arkennemasis Codex LLM (ChatGPT login)
  • image_1
  • image_2
  • image_3
  • image_4
  • text
  • account
prompt
system_instructions
batch_keys
model
model_override
reasoning_effort
json_onlyfalse
codex_home
allow_refreshtrue
timeout_seconds600
force_rerunfalse
run_mode
max_concurrent2
batch_total0
batch_size5
speed

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_1 through image_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_override takes a raw model id for anything newer than the dropdown.
  • reasoning_effort - default through max. The tooltip's guidance is the good stuff: ultra is the Codex CLI's own workhorse and worth it for story planning, where one call decides the quality of everything downstream. default omits 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. Set batch_total with batch_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 - fast sends service_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.

Categoryarkennemasis/LLM

Inputs (20)

NameTypeDefaultDescription
promptSTRING
system_instructionsoptSTRINGThe role/rules for the model. Wire the 'System Instructions' node here, or type it directly.
image_1optIMAGEOptional image to look at. Can be a batch.
batch_keysoptSTRINGOptional 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_2optIMAGE
image_3optIMAGE
image_4optIMAGE
modeloptCOMBOSmartest first. Availability depends on your ChatGPT plan; if one is refused, try the next.
model_overrideoptSTRINGRaw model id, used INSTEAD of the dropdown when not blank. For models newer than this node.
reasoning_effortoptCOMBOHow 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_onlyoptBOOLEANfalseDemand bare JSON and strip any ``` fences from the answer. Turn on when a downstream node parses the text.
codex_homeoptSTRINGFolder holding auth.json. Blank = CODEX_HOME, else ~/.codex. Give each ChatGPT account its own folder and point here to switch account.
allow_refreshoptBOOLEANtrueRefresh an expired token and save it back. Off = fail instead of writing to auth.json.
timeout_secondsoptINT6000–864000 = wait indefinitely. Planning a long scene list with high effort can take minutes.
force_rerunoptBOOLEANfalseCall again even if inputs are unchanged.
run_modeoptCOMBOComfyUI runs async nodes concurrently. 'one at a time' serialises every arkennemasis API node in the graph.
max_concurrentoptINT20–32Only used when run_mode is 'all at once': how many arkennemasis API calls may be in flight together. 0 = no cap.
batch_totaloptINT00–500How 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_sizeoptINT51–100Items 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.
speedoptCOMBOThe 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)

NameTypeDescription
textSTRING
accountSTRING