How to paste an image in Codex CLI
Paste with Ctrl+V, or attach a file with -i / --image. Codex can read the picture — describe a screenshot, match a mockup, write CSS from it — and it can generate images on its own with $imagegen (OpenAI’s GPT Image). For other models, batches of up to 4, or SVG, add Tastepix as an MCP server and ask in the same session. 12 models, no API keys, pay per image from €0.03.
Full install, sign-in and troubleshooting live on /codex. Paste and attach steps below match OpenAI’s Codex image-input docs.
Three official ways
Paste, attach a path, or Shift-drag.
These are the methods OpenAI lists for giving Codex an image. If a shortcut is not on this page, it is because it is not in the public docs.
01
Paste from the clipboard
Copy a screenshot or image, then press Ctrl+V in the Codex interactive composer. OpenAI’s Codex TUI documents that shortcut: it attaches the image to your next message. Say what Codex should inspect and what you want back — a diagnosis, CSS, a fix.
02
Attach with -i or --image
Pass one or more files when you start Codex. OpenAI’s CLI reference lists
--image, -ias “attach one or more image files to the initial prompt.” Separate several paths with commas, or repeat the flag. Documented formats include PNG and JPEG.03
Shift-drag in the IDE extension
In the Codex IDE extension, drag an image into the prompt composer while holding Shift so the extension accepts the drop instead of handing it to the editor. Same idea as attaching a reference for
$imagegen.
codex -i screenshot.png "Explain this error and suggest the smallest fix"codex --image before.png,after.png "Compare these states and list the regressions"Image input: Image inputs. Flag list: Codex CLI reference. The -i examples above are OpenAI’s.
What Codex can do
It can read images. It can also generate them.
Image input and image generation are different. A paste is context for the coding model. $imagegen creates a new bitmap on GPT Image. OpenAI’s image-generation docs draw that line.
Codex on its own
- Read a screenshot, mockup, diagram or photo you paste or attach
- Describe UI, find a visual bug, or write CSS and HTML from a design
- Compare more than one image in the same prompt
- Generate or edit a raster image with the built-in $imagegen skill (GPT Image)
- Pick a model other than GPT Image without an extra tool
- Return a real SVG file from $imagegen (it is bitmap-only)
- Remove a background, upscale, vectorize or animate a still, unless you add a tool that does
With Tastepix
- 12 models (Nano Banana, GPT Image, FLUX, Seedream, Qwen, Recraft, Grok)
- Edits of a file in the repo, from a path or a public URL
- Up to 4 options in one generate_image call
- SVG via Recraft Vector or vectorize_image, plus cutouts, upscale and short video
- Files saved straight into the project, and kept in your gallery
Then generate with Tastepix
Add Tastepix, ask for the file.
Same commands as the Codex setup. One sign-in, then you ask in plain words. Name Tastepix or a model so Codex does not reach for $imagegen.
The server
Adds Tastepix to ~/.codex/config.toml, shared by the CLI, the IDE extension and the desktop app. Codex opens the sign-in page; if it does not, run codex mcp login tastepix.
codex mcp add tastepix --url https://mcp.tastepix.com/mcpcodex mcp login tastepixOr 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. Documented in tastepix-mcp.
codex plugin marketplace add paablobello/tastepix-mcpUse Recraft V4.1 from Tastepix to draw a minimal app icon of a paper kite and save it to public/icon.png.

Edit an existing image
Tastepix needs the file, not only the paste.
A clipboard paste is enough for Codex to see the picture. To change those pixels — background off, restyle, vectorize — point Codex at the file on disk.
Give Codex the path, or attach it with --image, and describe the change. Codex can run code, so it calls request_upload, PUTs the file to a one-time Tastepix upload link, then edits it. A public https image URL works as a reference too.
Take assets/cup.jpg, remove the background with Tastepix and save it as public/images/cup.png.
Accepted uploads are PNG, JPEG and WebP. Parameters for every tool, including request_upload, are on /tools.


Batches and SVG
Several options, or a vector file.
generate_image takes a count of 1–4. SVG is either a Recraft Vector generation or vectorize_image on a file you already have.
Up to 4 in one call
Use Tastepix to make four 16:9 Open Graph options for the launch post, then save the one I pick to public/og/launch.png.
Each image is charged at its price. For a whole folder, ask in one message and Codex walks the list. A daily spending limit in Settings puts a ceiling on a long run.

GPT Image 2.5

Seedream 5.0 Pro

FLUX.3
SVG logos and icons
Make a flat monogram for Solmar with Recraft V4.1 Vector and save it as src/assets/logo.svg. If I already have the PNG, vectorize that file instead.
Recraft V4.1 Vector returns a real SVG. vectorize_image converts an existing bitmap (best on clean artwork; photos come out stylized). Both land in the repo at the path you name, and in your Tastepix gallery. Current price is on /pricing.
Models and prices
The same list as /pricing.
VAT included. Source: /pricing. What each model is best for: /models. Default model: Nano Banana 2.1.
| Model | Good for | From |
|---|---|---|
| GPT Image 2.5 Fast | cheap everyday drafts | €0.03 |
| Seedream 5.0 Flash | fast photoreal drafts | €0.04 |
| Nano Banana 2.1default | all-rounder, editing | €0.075 |
| FLUX.3 | photorealism | €0.08 |
| GPT Image 2.5 | precise prompts, text | €0.105 |
| Nano Banana Pro | dense text, 4K | €0.265 |
Tools: background removal €0.04 · upscale 2×/4× €0.08 · vectorize_image €0.02 · image-to-video €0.065/second. All models and sizes.
When something’s off
Troubleshooting
Paste, attach, and Codex picking the wrong image tool. Auth, balance and timeouts are on /codex.
Paste does nothing, or inserts junk
Codex documents Ctrl+V for a clipboard image. Some terminals intercept that chord. Save the file and attach it instead: codex -i screenshot.png "…".
--image cannot find the file
The path is relative to the directory where you ran codex. Use a path that exists. OpenAI documents PNG and JPEG for attached images.
Codex uses $imagegen instead of Tastepix
Name it in the prompt: “use Tastepix to make…”, or name a model (“with FLUX.3”). If Tastepix is not listed, add it with codex mcp add tastepix --url https://mcp.tastepix.com/mcp and sign in. Setup notes are on /codex.
Tastepix cannot edit the pasted image
A clipboard paste is context for Codex, not a file Tastepix can open. Give the path on disk, or attach it with --image, and describe the change.
FAQ
Codex images, answered.
Setup, sign-in and removing the server are on /codex. Something else? Write to hola@tastepix.com.
Copy the image to the clipboard, then press Ctrl+V in the Codex interactive composer. OpenAI’s Codex TUI documents that shortcut: it attaches the image to your next message. If the terminal swallows the paste, attach a file with --image instead.
Start Codex with -i or --image and a path, for example codex -i screenshot.png "Explain this error and suggest the smallest fix". For several images, separate paths with commas or repeat --image. OpenAI documents PNG and JPEG. In the Codex IDE extension, drag an image into the composer while holding Shift.
Yes. Codex ships a built-in $imagegen skill on OpenAI’s GPT Image. To generate with other models, batches of up to 4, or a real SVG, add Tastepix as an MCP server at https://mcp.tastepix.com/mcp. Full setup is on /codex.
imagegen is Codex’s built-in image skill. Include $imagegen in the prompt to invoke it, or just ask for an image. It uses OpenAI’s GPT Image and counts toward your Codex usage. Attach a reference with -i or --image when the new image should follow an existing one. Tastepix is a separate MCP server if you want another model, SVG, a cutout or an upscale.
Yes, as a coding task with visual context — not as a dedicated “CSS from image” tool. Paste or attach a screenshot or mockup, then ask Codex to write or fix the CSS and HTML. OpenAI’s image-input docs use interface design and a checkout-vs-mockup spacing example for this.
It can see the pixels: describe a screenshot, find a bug in a UI, compare a mockup, or write CSS and HTML from a design. That is image input, not generation. To create a new photo or illustration, use $imagegen or add Tastepix.
Codex can see a clipboard paste, but Tastepix needs the file itself. Give Codex the file’s path (or attach it with --image) and describe the change. Codex uploads it to Tastepix through a one-time upload link, then edits it. A public https image URL works as a reference too.
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. The full setup is on /codex.
generate_image takes a count of 1 to 4 in one call — useful for options 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.
Ask for a new logo or icon with Recraft V4.1 Vector, or turn an existing file into SVG with vectorize_image (€0.02 per image). Tell Codex where to save the .svg in the repo.
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 are on /pricing.
No. Codex $imagegen uses your Codex plan. Tastepix is a separate prepaid balance: you sign in once with OAuth, and Tastepix provides every model. Nothing to put in an environment variable.
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.

Paste the image. Then generate the rest.
Free credit for new accounts, no card needed.