Nodes/comfyui-arkennemasis/arkennemasis Codex Image Gen (ChatGPT login)
ComfyUI Node

arkennemasis Codex Image Gen (ChatGPT login)

Generate or edit an image with gpt-image-2 using your ChatGPT/Codex login instead of an API key. Run `codex login` first. Multiple accounts: set codex_home per account.

By Hishamahmer·Created about a month ago·Updated 9 days ago· 5
arkennemasis Codex Image Gen (ChatGPT login)
  • image_1
  • image_2
  • image_3
  • image_4
  • settings
  • image
  • account
prompt
aspect_ratio
quality
background
codex_home
allow_refreshtrue
timeout_seconds300
force_rerunfalse
run_mode
max_concurrent2
on_failure
speed
Categoryarkennemasis/Image Gen

Inputs (17)

NameTypeDefaultDescription
promptSTRING
image_1optIMAGEOptional reference / image to edit. Can be a batch.
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
aspect_ratiooptCOMBOStated in the prompt, because this backend ignores the size field. Wide/tall targets land close but not exact (16:9 came back as 7:4). Use the Replicate node when the ratio must be precise.
qualityoptCOMBO4 options: default, low, medium, high
backgroundoptCOMBO4 options: default, opaque, transparent, auto
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_secondsoptINT3000–864000 = wait indefinitely.
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. 2 is a safe default for a 24-shot batch.
on_failureoptCOMBOWhat to do when the backend definitively returns no image after every retry - usually a moderation refusal. 'fail the run' is right for a single image. Inside a multi-scene loop it is catastrophic: one refusal on the 23rd image threw away 22 finished images and 36 minutes of work. 'use the reference image' substitutes the input image for that scene so the run completes, and says so loudly in the log so you can re-render just that scene.
settingsoptARK_IMAGE_SETTINGSOptional: the shared 'Image Gen Settings' node, so this and the Replicate nodes follow one place. Codex uses aspect_ratio / quality / background / run_mode / timeout_seconds; output_format, moderation and api_token do not apply and are ignored.
speedoptCOMBOThe Codex CLI's Speed setting. 'fast' sends service_tier=priority (its '1.5x speed, increased usage' option). Worth far less here than on the text step: an image is dominated by generation time, not by queueing, so this mostly just spends plan quota faster. Leave it on standard unless you are waiting on a single hero image.

Outputs (2)

NameTypeDescription
imageIMAGE
accountSTRING