[{"data":1,"prerenderedAt":265},["ShallowReactive",2],{"project-\u002Fprojects\u002Fcodex-img":3,"related-codex-img":222,"news-codex-img":223,"more-codex-img":228},{"id":4,"title":5,"body":6,"coverLabel":202,"description":203,"detailImage":202,"extension":204,"featured":205,"github":206,"image":207,"imageFit":202,"links":202,"meta":208,"navigation":209,"order":210,"path":211,"platforms":212,"seo":213,"stem":214,"tags":215,"tech":218,"url":202,"__hash__":221},"projects\u002Fprojects\u002Fcodex-img.md","codex-img",{"type":7,"value":8,"toc":193},"minimark",[9,14,23,30,34,105,109,112,115,119,144,167,171,190],[10,11,13],"h2",{"id":12},"overview","Overview",[15,16,17,18,22],"p",{},"A ChatGPT subscription comes with image generation, but from the terminal the usual way to get at it is to ask the Codex agent to draw something. codex-img skips the agent. It sends your prompt to the same image endpoint the Codex CLI uses, with the login ",[19,20,21],"code",{},"codex login"," already saved, and writes the image to disk. That's one request per image, and your prompt reaches the image model word for word.",[15,24,25,26,29],{},"It's built for scripts and coding agents as much as for people. Paths go to stdout, progress to stderr, ",[19,27,28],{},"--json"," gives one line of metadata per image, and each kind of failure has its own exit code.",[10,31,33],{"id":32},"what-it-does","What it does",[35,36,37,53,62,72,81,89,99],"ul",{},[38,39,40,44,45,48,49,52],"li",{},[41,42,43],"strong",{},"Generate and edit",": ",[19,46,47],{},"codex-img \"a red fox in snow, flat vector\" -o fox.png",". Add up to five ",[19,50,51],{},"-i"," reference images to edit or combine them.",[38,54,55,44,58,61],{},[41,56,57],{},"Several at once",[19,59,60],{},"-n 4"," runs four requests in parallel.",[38,63,64,67,68,71],{},[41,65,66],{},"PNG, JPEG or WebP",": the backend returns PNG, and codex-img converts it locally. WebP is lossy by default, and a 946 KB image came out at 7.5 KB; ",[19,69,70],{},"--lossless"," keeps every pixel. Every PNG it writes is also recompressed losslessly, which roughly halves the file.",[38,73,74,44,77,80],{},[41,75,76],{},"Palette PNGs",[19,78,79],{},"-c 64"," reduces the image to 64 colours, like pngquant, and keeps transparency. A 946 KB icon came out at 8 KB.",[38,82,83,88],{},[41,84,85],{},[19,86,87],{},"codex-img convert",": the same conversion for images you already have. It doesn't use your login or quota.",[38,90,91,94,95,98],{},[41,92,93],{},"Safe with your login",": it only reads ",[19,96,97],{},"~\u002F.codex\u002Fauth.json",". It never refreshes or writes tokens, so it can't log Codex out.",[38,100,101,104],{},[41,102,103],{},"Never overwrites"," an existing file.",[10,106,108],{"id":107},"for-agents","For agents",[15,110,111],{},"The repository includes an Agent Skill that Claude Code, Codex and other skill-aware agents pick up when a task needs an image. It explains when to spend quota, what to do for each exit code (don't retry a quota or login error, for example), and how to write prompts.",[15,113,114],{},"If the binary isn't installed, the skill falls back to a small Python script that uses only the standard library. It has the same flags and output, but writes PNG only. Copying the skill folder is enough to get started.",[10,116,118],{"id":117},"install","Install",[15,120,121,122,129,130,132,133,136,137,139,140,143],{},"Download the archive for your platform from the ",[123,124,128],"a",{"href":125,"rel":126},"https:\u002F\u002Fgithub.com\u002Ffoksa\u002Fcodex-img\u002Freleases\u002Flatest",[127],"nofollow","latest release",". There are builds for macOS (Apple Silicon and Intel) and Linux (x86-64 and ARM64, fully static). Put ",[19,131,5],{}," on your ",[19,134,135],{},"PATH",", and log in once with ",[19,138,21],{}," using your ChatGPT account. ",[19,141,142],{},"codex-img status"," checks the login without using any quota.",[15,145,146,147,150,151,154,155,158,159,162,163,166],{},"Format conversion, lossy WebP, palette PNGs and ",[19,148,149],{},"convert"," are on ",[19,152,153],{},"main"," and will be in the next release. Until then, build from source with ",[19,156,157],{},".\u002Fscripts\u002Finstall.sh",", which also links the skill into ",[19,160,161],{},"~\u002F.claude\u002Fskills"," and ",[19,164,165],{},"~\u002F.codex\u002Fskills",".",[10,168,170],{"id":169},"built-with","Built with",[15,172,173,174,177,178,181,182,185,186,189],{},"Rust, as a single ~2 MB binary with no runtime dependencies. It uses ",[19,175,176],{},"ureq"," for HTTP, the ",[19,179,180],{},"image"," crate for decoding and JPEG, libwebp for WebP, ",[19,183,184],{},"exoquant"," for palettes and ",[19,187,188],{},"oxipng"," for PNG recompression. The skill's fallback script is plain Python 3.9.",[15,191,192],{},"This isn't an official API. codex-img calls the backend the Codex CLI uses, so it can break when that backend changes.",{"title":194,"searchDepth":195,"depth":195,"links":196},"",2,[197,198,199,200,201],{"id":12,"depth":195,"text":13},{"id":32,"depth":195,"text":33},{"id":107,"depth":195,"text":108},{"id":117,"depth":195,"text":118},{"id":169,"depth":195,"text":170},null,"Generate and edit images from the command line with your ChatGPT\u002FCodex subscription. No API key, and no agent in between.","md",false,"https:\u002F\u002Fgithub.com\u002Ffoksa\u002Fcodex-img","\u002Fimg\u002Fproducts\u002Fcodex-img.webp",{},true,7,"\u002Fprojects\u002Fcodex-img","macOS · Linux · CLI",{"title":5,"description":203},"projects\u002Fcodex-img",[216,217],"ai","cli",[219,220],"rust","python","LXplxL-1kEyVh7tB6r8fLUT0mC0scg0TeM0HwgFUP3U",[],[224],{"path":225,"date":226,"title":227},"\u002Fblog\u002Fcodex-img","2026-09-28","codex-img generates images from the terminal with your ChatGPT subscription",[229,234,240,245,250,255,259,264],{"path":230,"title":231,"description":232,"image":233,"imageFit":202,"coverLabel":202},"\u002Fprojects\u002Fcamera-video-converter","Camera Video Converter","Free, offline Android app that turns hard-to-share camera footage into standard 1080p MP4s, right on the phone.","\u002Fimg\u002Fproducts\u002Fcamera-video-converter.webp",{"path":235,"title":236,"description":237,"image":238,"imageFit":239,"coverLabel":194},"\u002Fprojects\u002Fopen-claude-agent-sdk","open-claude-agent-sdk","Drop-in, open-source replacement for @anthropic-ai\u002Fclaude-agent-sdk. Readable TypeScript that runs on the Claude CLI you already have installed.","\u002Fimg\u002Fproducts\u002Fopen-claude-agent-sdk-home.webp","contain",{"path":241,"title":242,"description":243,"image":244,"imageFit":202,"coverLabel":202},"\u002Fprojects\u002Fyoutube-shorts-blocker","YouTube Shorts Blocker","A lightweight Chrome extension that hides YouTube Shorts everywhere and can redirect Shorts links.","\u002Fimg\u002Fproducts\u002Fyoutube-shorts-blocker.webp",{"path":246,"title":247,"description":248,"image":249,"imageFit":202,"coverLabel":202},"\u002Fprojects\u002Fusage-window-starter","Usage Window Starter","A macOS menu bar app that starts your next Claude Code and Codex 5-hour session the moment the old one resets.","\u002Fimg\u002Fproducts\u002Fusage-window-starter.webp",{"path":251,"title":252,"description":253,"image":254,"imageFit":202,"coverLabel":202},"\u002Fprojects\u002Fsub2utf","sub2utf","Converts subtitle files (.srt) from legacy encodings to UTF-8 so Plex shows č, ć, š, đ and ž correctly.","\u002Fimg\u002Fproducts\u002Fsub2utf.webp",{"path":256,"title":257,"description":258,"image":202,"imageFit":202,"coverLabel":202},"\u002Fprojects\u002Fdocument-iteration-skill","document-iteration-skill","A lightweight markdown syntax for editing documents with Claude: leave feedback inline instead of asking it to regenerate the whole document.",{"path":260,"title":261,"description":262,"image":263,"imageFit":202,"coverLabel":202},"\u002Fprojects\u002Flitrpgvault","LitRPG Vault","A database of LitRPG and Progression Fantasy books: 250+ series with ratings, reading orders and audiobook links.","\u002Fimg\u002Fproducts\u002Flitrpgvault.webp",{"path":211,"title":5,"description":203,"image":207,"imageFit":202,"coverLabel":202},1790599779474]