Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Codex Imagen

    1

    Generate and edit images through ChatGPT/Codex OAuth, even behind custom model routers

    Free

    Security scanned
    Codex Imagen

    Codex Imagen

    Example session with this skill installed

    Create a 16:9 hero image for my blog post "Automate your weekly marketing report": flat vector, warm orange #F47A32 and charcoal, a laptop dashboard and a robot arm dropping a finished report into an inbox, no text. Save it to ./img/.

    • Read your context and instructions
    • Compiled the codex imagen

    Summary

    Generated

    1 image through the hosted Codex image flow with my existing Codex OAuth login (no API key), in one attempt with no retries. Request ID 427dcc0f-2660-4c46-90c1-81714b01cec0.

    Command

    node scripts/codex-imagen.mjs --json --timeout 300 -o ./img/ \
      --prompt 'Generate one wide 16:9 editorial hero illustration for a blog post titled "Automate your weekly marketing report". Flat vector style, warm orange (#F47A32) and charcoal palette, a laptop showing a dashboard with charts, a small robot arm placing a finished report into an inbox, clean light background, no text.'
    

    Result

    FieldValue
    File./img/codex-imagen-20261025-042842Z-1-ig_0875….png
    Size1,672 × 941 px, 1.47 MB PNG
    Model / operationgpt-5.6-sol / responses image_generation
    Statuscompleted (not partial)
    SHA-2569de1846d…b9d29c5e

    The model expanded the prompt to keep the dashboard

    free of words, letters, and numbers (charts, donut graphs, and metric cards only), with the laptop center-left and the robot arm on the right dropping the report into a charcoal inbox tray. The palette stayed on brand: #F47A32 orange, charcoal, and a warm off-white background. (The image is in this listing's screenshots.)

    Next steps

    • Want variants? Ask for "3 images" in the prompt and use --timeout 600.
    • To restyle it, pass this file back with --input-ref and describe the change.
    • For a 1:1 social crop, generate again with "square 1:1" in the prompt rather than cropping the hero.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Using Codex through a custom model router such as 9Router? Chat keeps working, but native image generation often breaks because the router doesn't forward Codex's hosted image_generation tool. This skill restores it.

    What it does

    • Generates one or more images through Codex's hosted image flow, bypassing the active model provider
    • Edits images from local files, URLs, or data URLs as references
    • Streams results and saves each image as soon as it arrives, returning file paths or JSON
    • Signs in with your ChatGPT account; no API key, no environment variables, nothing to configure
    • Refreshes OAuth safely across concurrent agents and tells you clearly when you need to sign in again
    • Retries transient failures without creating duplicate generations

    Requirements

    Node.js 22+ and a ChatGPT account. Setup is one command: node scripts/refresh-codex-auth.mjs signs you in through the Codex CLI device login and saves a dedicated credential. An existing OpenClaw login is picked up automatically. Your normal ~/.codex/auth.json is never touched.

    Open source (MIT): https://github.com/zhuylanz/lapage-codex-imagen


    Built and maintained by LaPage Digital: websites, automation, and AI operations for growing businesses.

    Needs a ChatGPT account: sign in once with the bundled helper (uses the Codex CLI device login) or reuse an existing OpenClaw login. Reference images: PNG, JPEG, GIF and WebP. Generation counts against your ChatGPT plan allowance.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 22 days ago

    • Free with an Agensi account

    Requires

    OpenAI
    Chatgpt
    Node.js 22+
    ChatGPT account
    Codex CLI

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Environment Variables

    Allowed Hosts

    chatgpt.com
    auth.openai.com

    Network: only chatgpt.com (Codex image generation) and auth.openai.com (OAuth token refresh), plus reference image URLs you pass. Environment variables: only the optional CODEX_HOME. Reads and refreshes the dedicated OAuth file (~/.codex/imagen_auth.json or an OpenClaw store) and writes images to the output folder. Never prints tokens. No update checks.

    Listed23 days ago

    What's inside

    Frequently Asked Questions

    No. Sign in once with your ChatGPT account (node scripts/refresh-codex-auth.mjs) and there is nothing else to configure.

    Custom model routers often don't expose or forward Codex's hosted image_generation tool. This skill calls the hosted flow directly.

    Yes. It's open source under MIT. Image generation uses your ChatGPT plan's allowance.

    New in Image & Video