How to generate images in Codex

Yes — Codex can generate images. Its built-in $imagegen skill uses OpenAI’s GPT Image. To generate images in Codex with any model, add Tastepix as an MCP server at https://mcp.tastepix.com/mcp: run codex mcp add tastepix --url https://mcp.tastepix.com/mcp, sign in once in the browser, then ask Codex for the image and where to save it. You get 12 models (Nano Banana, GPT Image, FLUX, Seedream, Qwen, Recraft with SVG export, and Grok) plus background removal, upscaling, SVG via vectorize_image and image-to-video. No API keys, and you pay per image from €0.03, with no subscription.

Pasting a screenshot, attaching a file with --image, or generating batches and SVGs: how to use images in Codex.

codex mcp add tastepix --url https://mcp.tastepix.com/mcp

One entry covers the Codex CLI, the IDE extension and the desktop app: they share ~/.codex/config.toml. Prefer clicking? Add it from Settings → MCP servers.

The short answer

Can Codex generate images?

Yes. Codex can generate images with its built-in $imagegen skill, which uses GPT Image. Add Tastepix at https://mcp.tastepix.com/mcp when you want another model, an SVG, a transparent PNG, an upscale or a short video, saved into the repo.

Codex on its own

  • Writes and edits code, copy and config
  • Built-in $imagegen on OpenAI’s GPT Image
  • Reads files in the repo and saves what you ask
  • Models other than GPT Image, or a real SVG file

With Tastepix

  • 12 models (Nano Banana, GPT Image, FLUX, Seedream, Qwen, Recraft, Grok)
  • Real SVG via Recraft Vector or vectorize_image
  • Background removal, 2×/4× upscale, image-to-video
  • Files saved into the project, plus a gallery on tastepix.com

How to paste or attach an image, what Codex can do with it natively, and how to generate more: /codex/images.

Codex CLI, three steps

Add, sign in, ask.

About two minutes the first time. After that, Tastepix is just another tool Codex can call.

  1. 01

    Add Tastepix

    Run the command in any terminal. Codex writes Tastepix into ~/.codex/config.toml as a streamable HTTP server, so it’s there in every project.

    Terminal
    $ codex mcp add tastepix --url https://mcp.tastepix.com/mcp
    Added global MCP server 'tastepix'.
    Detected OAuth support. Starting OAuth flow…
  2. 02

    Sign in

    Codex opens the Tastepix sign-in page in your browser. Sign in and click Allow. If it didn’t open, or you’re on a remote machine, run codex mcp login tastepix (add --no-browser to get a link instead). New accounts get free credit, and no card is needed.

    Terminal
    $ codex mcp list
    Name Url Bearer Token Env Var Status Auth
    tastepix https://mcp.tastepix.com/mcp - enabled Not logged in
    $ codex mcp login tastepix
    Your browser opens the Tastepix sign-in page. Sign in, click Allow, and you’re connected.
  3. 03

    Ask for an image

    Start codex and ask in plain words. Name Tastepix or a model so Codex uses it rather than its built-in tool. Codex calls Tastepix, then saves the file where you asked. Every image is also kept in your gallery at tastepix.com.

    Use Recraft V4.1 from Tastepix to draw a minimal app icon of a paper kite and save it to public/icon.png.
    A minimal app icon of a blue and orange paper kite on a rounded off-white square, made with Recraft V4.1 through Tastepix
    public/icon.pngRecraft V4.1 via Tastepix

CLI, plugin, config.toml, app

Four ways in. One server.

Pick the one that matches how you run Codex. They all end in the same hosted MCP server at https://mcp.tastepix.com/mcp, and you sign in once.

Codex CLI and IDE extension

One command

The quickest way. codex mcp add with --url registers a streamable HTTP server and starts the sign-in for you. The IDE extension and the desktop app read the same config, so they pick Tastepix up too.

codex mcp add tastepix --url https://mcp.tastepix.com/mcp

Codex CLI plugin

Or install the plugin

On the Codex CLI, add the Tastepix marketplace, then install tastepix from /plugins. That registers the hosted MCP server and the Tastepix skill together. Documented in the public tastepix-mcp repo.

Then sign in with codex mcp login tastepix if Codex has not opened the browser yet.

codex plugin marketplace add paablobello/tastepix-mcp

config.toml

Or edit the file

The command above writes exactly these two lines. Add them by hand if you keep your Codex config in dotfiles, then run codex mcp login tastepix.

For one repo only, put them in .codex/config.toml at the project root. Codex reads project config only in projects you’ve marked as trusted.

~/.codex/config.toml
[mcp_servers.tastepix]
url = "https://mcp.tastepix.com/mcp"

Codex desktop app

Add it in Settings

Open Settings → MCP servers → Add server. Name it tastepix, choose Streamable HTTP, paste the URL and save. Select Restart, then Authenticate, and click Allow on the Tastepix page.

In the IDE extension the same screen is under the gear menu → MCP servers, and ends with Restart extension.

  1. Settings
  2. MCP servers
  3. Add server
Name
tastepix
Type
Streamable HTTP
URL
https://mcp.tastepix.com/mcp

Many files at once

Generate a batch

One generate_image call can return up to 4 options. One message can cover a whole folder: Codex writes a prompt for each file and saves it where it belongs.

Count 1–4, or a whole folder

Use Tastepix to make 4 logo options for this app with Recraft V4.1 Vector, then pick the strongest and save the SVG to src/assets/logo.svg.
For every post in content/blog that has no og_image yet, use GPT Image 2.5 through Tastepix to make a 1200×630 Open Graph image with the post title on it. Save each one to public/og/ named after the slug. Do one first and show me before the rest.
  • count is 1–4 on a single generate_image call. Each image is charged; a failed one is refunded.
  • Ask for one first on a long list: once you like the look, the rest follow.
  • Tastepix runs a few images at a time per account, so a long list goes through in turns. A daily spending limit in Settings puts a ceiling on a long run.

og/summer-launch

og/recipe-roundup

og/how-we-ship

Images made with Tastepix.

What developers use it for

Assets, straight into the repo.

Codex writes the prompt, calls Tastepix and puts the file where your code expects it, then updates the code that uses it.

Paper kite app icon generated with Recraft V4.1
App icons and favicons“Use Recraft V4.1 to draw a minimal app icon of a paper kite, save it as public/icon.png and add it to the manifest.”
A terracotta cup and saucer with the background removed, shown on a transparency grid
Transparent PNGs“Use Tastepix to remove the background from assets/cup.jpg and save the cutout as assets/cup.png.”
Isometric clay-style illustration of a pastel desk with a laptop, lamp and plants, made with FLUX.3
Hero and empty-state art“Use FLUX.3 for a soft isometric illustration of a desk for the empty state, and save it to src/assets/empty.webp.”
SVG logos and icons“Use Recraft V4.1 Vector for a flat logo mark, or call vectorize_image on an existing icon, and save the SVG to src/assets/logo.svg.”
OG images“Use GPT Image 2.5 to make a 1200×630 Open Graph image for each post in content/blog, with the post title on it.”
Seed and placeholder images“Use Seedream 5.0 Flash to make 12 product photos on white for the seed script, saved in fixtures/products/.”

Codex $imagegen vs Tastepix

Codex image generation vs an image MCP server

Codex ships an image skill, $imagegen, built on GPT Image. Keep using it. Add Tastepix when you want another model, an SVG, an upscale or a video clip.

Codex built-in ($imagegen)Tastepix in Codex
ModelsOpenAI GPT Image12 models from Google, OpenAI, Black Forest Labs, ByteDance, Qwen, Recraft and xAI
VectorBitmap onlyReal SVG files from Recraft V4.1 Vector
Finishing toolsEdits by prompt, transparent backgroundsBackground removal of any image, 2×/4× upscale, image-to-video
How you payYour Codex plan or an OpenAI API keyPer image from a prepaid balance, from €0.03
Other appsCodex onlySame account and gallery in Claude, ChatGPT, Claude Code and Cursor

To pick Tastepix for a request, say “use Tastepix” or name a model (“with FLUX.3”) in the prompt.

Where images go

In your repo, and in your gallery.

Tell Codex the path. Tastepix also keeps every image in one place, from every app.

Saved into the project

Ask for a path and Codex downloads the file there — public/og/launch.png, src/assets/logo.svg, wherever the repo needs it. Tastepix returns a URL; Codex usually uses curl. The default sandbox has network off, so it asks you to approve that download (see below).

Use FLUX.3 from Tastepix for a 16:9 hero of a quiet harbour at dusk and save it to public/images/hero.webp.

Kept on tastepix.com

The same image lands in your Tastepix gallery, so you can download it again, edit it or reuse it as a reference — including images you made from Claude Code or Cursor.

Sandbox and approvals

What Codex asks you, and why.

Two things are worth knowing before the first image: how the file reaches your repo, and how to confirm each paid call.

Saving the file needs the network

Tastepix returns the image as a link, and Codex downloads it into your project with a shell command (usually curl). In the default workspace-write sandbox network access is off, so Codex asks you to approve the download. To skip that question, turn network on for the sandbox:

~/.codex/config.toml
[sandbox_workspace_write]
network_access = true

The Tastepix call itself is an MCP tool call, which the command sandbox doesn’t block.

Confirm every paid call

Each generation is charged to your balance. If you’d rather approve each tool call before Codex makes it, set the approval mode on the server:

~/.codex/config.toml
[mcp_servers.tastepix]
url = "https://mcp.tastepix.com/mcp"
default_tools_approval_mode = "prompt"

Codex always asks before tools marked destructive. No Tastepix tool is, so this line is what makes it ask every time.

Models and prices

Picked for repo assets.

VAT included. Name a model in the prompt to switch from the default (Nano Banana 2.1). Every model and size is on the pricing page; what each is best for is on /models.

ModelGood forFrom
Nano Banana 2.1defaultall-rounder, edits from a reference€0.075
Recraft V4.1 VectorSVG logos and icons€0.16
GPT Image 2.5OG images with exact text€0.105
Qwen Image 3small and multilingual text€0.06
FLUX.3photoreal hero images€0.08
Seedream 5.0 Flashcheap placeholder and seed images€0.04

Tools: background removal €0.04 · upscale 2×/4× €0.08 · vectorize_image €0.02 · image-to-video €0.065/second. All models and sizes · MCP tools.

AGENTS.md

Teach Codex your image conventions

Codex reads AGENTS.md at the start of a session. A few lines there and you stop repeating yourself: which model to use, the house style, sizes and where files go. Edit it to match your project.

AGENTS.md
## Images
- Make images with the Tastepix MCP server. Never use placeholder boxes or SVG stand-ins.
- Default model: Nano Banana 2.1. Use GPT Image 2.5 when the image has text in it.
- Logos and icons: Recraft V4.1 Vector, and save the SVG. Or call vectorize_image on an existing bitmap.
- House style: soft daylight, warm neutrals, plenty of empty space, no text unless asked.
- Hero and Open Graph images 16:9, icons 1:1 with the background removed.
- Save to public/images/, kebab-case names, keeping the file type you download.
- Before more than 10 images in one go, tell me how many and the total price.

When something’s off

Troubleshooting

Auth, timeouts, balance, and Codex picking the wrong image tool.

It says you’re not logged in

You haven’t signed in yet, or the sign-in expired. Run codex mcp login tastepix (add --no-browser on a remote machine to get a link). Check with codex mcp list: the Auth column should not say “Not logged in”.

Codex uses $imagegen instead of Tastepix

Name it in the prompt: “use Tastepix to make…”, or name a model (“with FLUX.3”). If Tastepix isn’t listed, run codex mcp list and add it again with codex mcp add tastepix --url https://mcp.tastepix.com/mcp.

The generation timed out

If the image never finished, Tastepix refunds it automatically. If Codex’s download hung after the image was made, it is still in your gallery on tastepix.com — ask Codex to save that URL into the repo.

Not enough balance, or the daily limit is reached

Tastepix refuses the call, nothing is made, and nothing is charged. Top up on tastepix.com, or raise or remove your daily spending limit in Settings. New accounts get free credit, with no card needed.

Paste an image as a reference

Press Ctrl+V so Codex can see the image, or attach a file with --image. To edit that exact file with Tastepix, give Codex its path. Paste, attach and generate guide.

Take assets/cup.jpg, remove the background with Tastepix and save it as public/images/cup.png.

Manage the connection

Check it, sign in again, or remove it.

The same codex mcp commands you use for any other server.

  • codex mcp list

    lists your MCP servers, with an Auth column that says whether you’re signed in.

  • codex mcp get tastepix

    shows the saved entry: transport, URL and headers.

  • codex mcp login tastepix

    signs in again, for example on a new machine.

  • codex mcp logout tastepix

    signs out but keeps the entry.

  • codex mcp remove tastepix

    removes it from config.toml.

  • /mcp

    inside a codex session, shows the servers that are active.

Terminal
$ codex mcp get tastepix
tastepix enabled: true transport: streamable_http url: https://mcp.tastepix.com/mcp bearer_token_env_var: - http_headers: - env_http_headers: - http_headers_helper: - remove: codex mcp remove tastepix

FAQ

Questions, answered.

Something else? Write to hola@tastepix.com.

Yes. Codex ships a built-in $imagegen skill on OpenAI’s GPT Image. To generate images in Codex with other models, add Tastepix as an MCP server at https://mcp.tastepix.com/mcp. Tastepix adds 12 models (Nano Banana, GPT Image, FLUX, Seedream, Qwen, Recraft and Grok), SVG via vectorize_image or Recraft V4.1 Vector, background removal, upscaling and image-to-video.

Paste a clipboard image with Ctrl+V in the interactive composer, or start Codex with -i / --image and a file path. OpenAI documents PNG and JPEG. The full paste, attach and generate guide is on /codex/images.

Run codex mcp add tastepix --url https://mcp.tastepix.com/mcp, sign in with codex mcp login tastepix if the browser doesn’t open, then start codex and ask in plain words, naming Tastepix or a model and the path to save. On the Codex CLI you can also run codex plugin marketplace add paablobello/tastepix-mcp and install tastepix from /plugins.

Codex's built-in image skill uses OpenAI's GPT Image model. Tastepix adds 12 models from several labs (Nano Banana, FLUX, Seedream, Qwen, Recraft and Grok, plus GPT Image), real SVG files from Recraft V4.1 Vector, background removal, upscaling and image-to-video, in one MCP server. Use whichever fits the asset.

Say so in the prompt: "use Tastepix" or name a model, like "with FLUX.3" or "with Recraft V4.1 Vector". Codex then calls the Tastepix tools.

No. You sign in to Tastepix once with OAuth, and Tastepix provides every model. There is nothing to put in an environment variable.

You pay per image from a prepaid balance, from €0.03 per image, with no subscription. Background removal is €0.04, upscale 2×/4× is €0.08, vectorize_image is €0.02, image-to-video is €0.065/second. Your first top-up starts at €5 ($5 in USD). Failed generations are refunded automatically, and your balance never expires. Current prices for every model and size are on /pricing.

Yes. generate_image takes a count of 1 to 4 in one call — useful for options or variations of the same prompt. Each image is charged on its own; a failed one is refunded. For a whole folder (OG images, icons), ask in one message and Codex walks the list, one file at a time.

Wherever you ask Codex to put them in the repo. Tastepix returns a URL; Codex downloads it (usually with curl) into that path. Every image is also kept in your gallery at tastepix.com.

If the image never finishes, Tastepix refunds it automatically and you are not charged. Check the gallery on tastepix.com in case Codex’s download timed out after the image was already made.

Tastepix refuses the call, nothing is made, and nothing is charged. Top up on tastepix.com. New accounts get free credit, with no card needed.

Yes. The CLI, the IDE extension and the desktop app share ~/.codex/config.toml, so adding it once covers all three. To add it from the app instead, go to Settings → MCP servers → Add server, choose Streamable HTTP and paste the URL.

The image comes back as a URL, and Codex downloads it into your project with a shell command. The default workspace-write sandbox has network access off, so Codex asks you to approve that download, unless you turn network access on in config.toml.

Nano Banana 2.1 by default. Name any model in your prompt to switch. The full list, with what each is best for, is on /models.

Yes. One account and one balance cover Codex, Claude, ChatGPT, Claude Code and Cursor.

On the Codex CLI, run codex plugin marketplace add paablobello/tastepix-mcp, then install tastepix from /plugins. That adds the hosted MCP server and the Tastepix skill. Documented in the public tastepix-mcp repo.

Run `codex mcp remove tastepix`.

One command in Codex. Every image model.

Free credit for new accounts, no card needed.

Get started