Prepare Codex and an API Key
- Sign in with your official account in the local Codex App or Codex CLI and open a project.
- Create a BetterToken API Key or use an existing key.
- Check the image model and current pricing in the model plaza. Start with
gpt-image-2.
bettertoken.ai. This workflow is for the local App and CLI; cloud tasks need their own runtime and credentials.
Step 1: send the setup prompt to Codex
Copy the whole prompt below. It contains a placeholder, so you do not need to share a real key.Step 2: fill in the key locally
Open the config file that Codex reports. Replace the placeholder incredentials.api_key.value with your BetterToken API Key.
For a custom
CODEX_HOME, use the absolute path Codex reports. This image configuration is separate from your Codex sign-in file.
A new configuration looks like this. When a file already exists, edit only the relevant entry:
providers is a configuration field of the community tool.
Step 3: generate your first image
Save the configuration, start a new Codex chat, and send:output/images/mug.png exists and opens, and the BetterToken usage log contains the matching image model request.

