Codex (Image Generation)

Install the GetRun image skill in Codex App or CLI, generate and edit images, and configure a direct image connection when using CCSwitch.

This guide takes you from installing the image skill to generating a lighthouse illustration and changing its sky to sunset. Set up Codex, Python, and a GetRun Key once, then describe your images directly in Codex.

First, install and connect Codex App or CLI and check that you can send a message. Prepare a GetRun API Key with image model access and available credit. The steps below focus on Codex App; CLI uses the same skill and configuration. Select any screenshot to view it at full size in a new tab.

1. Download and install the skill

Download the GetRun image skill (ZIP)

Choose your operating system. Run these commands in PowerShell or Terminal, not in a Codex conversation. Copy one command at a time, press Enter, and wait for it to finish.

Install Python and open PowerShell

  1. Visit the Python download page and install Python 3.11 or later. If you use the Python install manager from the website, complete its installation first.
  2. Press the Windows key, search for PowerShell, and open Windows PowerShell. You do not need an administrator window.
  3. Paste this command into PowerShell and press Enter:
py -3 --version

Continue when it shows Python 3.11.x or later, such as Python 3.14.x. If py is not found, finish installing Python, then close and reopen PowerShell.

Extract the skill and copy it into place

  1. Use the ZIP download link above. Find getrun-imagegen.zip in your browser's downloads and open its containing folder.
  2. Right-click the ZIP and choose Extract All → Extract. Open the extracted directory and locate the getrun-imagegen folder.
  3. Run this command in PowerShell to create the skills directory. It also works if the directory already exists:
New-Item -ItemType Directory -Force "$env:USERPROFILE\.agents\skills"
  1. Open File Explorer, click its address bar, enter %USERPROFILE%\.agents\skills, and press Enter.
  2. Copy the extracted getrun-imagegen folder here. Open it: you should see SKILL.md, scripts, and other files directly, without another nested folder of the same name.

The final path is %USERPROFILE%\.agents\skills\getrun-imagegen\SKILL.md. Copy the whole folder; you do not need to open or edit its files.

Install the skill's dependencies

Return to PowerShell and run these commands in order:

py -3 -m venv "$env:USERPROFILE\.agents\skills\getrun-imagegen\.venv"
& "$env:USERPROFILE\.agents\skills\getrun-imagegen\.venv\Scripts\python.exe" -m pip install "openai>=2,<3" pillow

The first command may produce no text; wait for the command prompt to return. The second downloads the dependencies. Continue after Successfully installed, or a message that they are already installed, with no errors.

The extracted getrun-imagegen folder in macOS Finder, with SKILL.md, scripts, references, and the license directly inside it.

Extracted folder on macOS, with Chinese labels. Windows contains the same files; copy the whole folder.

Start a new Codex conversation after installation. If the skill list has not updated, fully quit and reopen Codex. On macOS, use Command + Q to quit.

2. Configure the image connection (optional)

If Codex already connects directly to the GetRun API, the skill reuses its address and Key. No additional configuration is needed. This also applies to normal CCSwitch provider switching to GetRun. Continue to step 3: generate an image.

If you use another provider, sign in through ChatGPT, or enable local proxy takeover in CCSwitch, select “Independent Key setup”.

3. Generate an image in Codex

Choose a folder for your images

  1. Create a folder on your computer, such as “Image practice” on your desktop. This is where you will find the generated files.
  2. Open Codex App, select this folder as your project, and start a conversation. For CLI, enter this folder first, then run codex.
  3. Type $getrun-imagegen in the message box. Select getrun-imagegen from the skill list. If it does not appear, check the installation directory in step 1 and restart Codex.

Send your image request

Copy this prompt into the Codex message box and send it:

Use $getrun-imagegen to create a landscape illustration of a seaside lighthouse at dawn, 1536x1024.
Use the Python interpreter in this skill's .venv. Save it to output/imagegen/lighthouse.png and show the result.

Allow the necessary execution and network access when Codex requests it. The skill calls the Images API, and generation and editing use the image Key's credit.

Find and save the image

  1. Wait for Codex to finish and provide an image preview or saved path. A command appearing in the conversation does not mean generation has finished.
  2. Open your “Image practice” folder, then output → imagegen. Find lighthouse.png.
  3. Double-click to preview it. To put it on your desktop or share it, copy the PNG file. It is already saved locally; there is no need to take a screenshot of the conversation.

If you cannot find it, ask: “Where did you save the image? Give me its full path.” If the request timed out or its result is unclear, check the outcome before sending another generation request.

4. Use reference images or continue editing

Edit the image you just generated

Stay in the same conversation and send the following prompt. It saves a separate sunset version so you can compare it with the original:

Use $getrun-imagegen to edit output/imagegen/lighthouse.png.
Change only the sky to sunset. Keep the lighthouse position, shape, and illustration style. Keep the size at 1536x1024.
Save it as output/imagegen/lighthouse-sunset.png without overwriting the original, and show the result.

After it finishes, the same output/imagegen folder should contain both lighthouse.png and lighthouse-sunset.png.

Use your own reference image

  1. Copy the reference into “Image practice”, for example as reference.png. Keep the original file extension; do not rename a JPG extension to PNG.
  2. Ask Codex: “Use $getrun-imagegen to edit reference.png in this project. Make the background light gray, preserve the subject, and save to output/imagegen/reference-edited.png.”
  3. If the image is elsewhere, provide its full local path. Put paths containing spaces in straight double quotes.

The skill must be able to read this file before uploading it to the editing endpoint. Describing an image or naming a file that does not exist will not upload it. Support for multiple references and their limits depends on the selected model.

Troubleshooting

Related guides: Generate images with Harness App · Image generation and editing API · CCSwitch

On this page