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.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| image_1opt | IMAGE | Optional reference / image to edit. Can be a batch. | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| aspect_ratioopt | COMBO | Stated 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. | |
| qualityopt | COMBO | 4 options: default, low, medium, high | |
| backgroundopt | COMBO | 4 options: default, opaque, transparent, auto | |
| 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 | 3000–86400 | 0 = wait indefinitely. |
| 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. 2 is a safe default for a 24-shot batch. |
| on_failureopt | COMBO | What 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. | |
| settingsopt | ARK_IMAGE_SETTINGS | Optional: 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. | |
| speedopt | COMBO | The 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)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| account | STRING | — |