Codex Makes the Images for Your Project - Kadraris MCP, Quote, Approve, Save
Let Codex create your project's illustrations through Kadraris MCP: a capped key, one prompt that quotes first, your approval, files checked in the repo.
A landing page needs a hero, a docs site needs diagrams, an app needs empty-state art. With the Kadraris MCP server, Codex can produce those images and put them straight into the repo. Keep the roles apart: Codex's own model reads your code and plans, while an image model such as GPT Image 2.5 draws the picture. Adding the server leaves the model Codex chats with unchanged.
Connect Codex in two commands
Make a key for Codex first. Under API keys, create one, give it a monthly cap and copy it when it appears. It should never end up in the repo or in a prompt. Linking the server is free; you pay only for generations you confirm, and those need a positive balance.
macOS and Linux:
export KADRARIS_API_KEY="sk-kd-..."
codex mcp add kadraris --url https://kadraris.com/mcp \
--bearer-token-env-var KADRARIS_API_KEY
codex mcp listWindows PowerShell:
$env:KADRARIS_API_KEY="sk-kd-..."
codex mcp add kadraris --url https://kadraris.com/mcp `
--bearer-token-env-var KADRARIS_API_KEYUse your real key instead of sk-kd-.... The variable has to exist in the environment that launches Codex, so after setting it permanently, open a fresh terminal or restart the app. Other clients and install options are in the MCP docs; a longer Codex walkthrough with video and the chat tool is in Codex CLI with Kadraris MCP.
The prompt: price first, pictures second
This project needs three illustrations: a hero for
the home page and two section images. Look up image
models in the kadraris MCP and their inputs. Quote
each image with estimate_cost, give me the total and
stop. After I approve, generate with confirm_token.
Save into public/generated/, check each file's type
and pixel size, keep existing files untouched, and
do not deploy anything.A good first model for project art is GPT Image 2.5, at a unit rate of $0.05 per image. That is the price of one picture, not of the task; multiply by the number of images and check your settings in the cost calculator or on pricing.
What happens behind the prompt
search_modelsandget_modeltell Codex which models fit and which inputs they accept.estimate_costruns once per planned image and returns a price plus aconfirm_token. Nothing is charged.- After your approval,
generatereceives the matchingconfirm_token. Progress comes fromwait_for_taskorget_task. - Changing the prompt, the model or the size invalidates the quote, so Codex has to ask again. Tokens also time out.
Check what landed in the repo
- A task in the queue has no file yet. Only
succeededmeans there is output. - Codex downloads each URL from
outputinto the folder you named. Those URLs expire, so the site must use the local file, never the link. - Open every image, confirm its dimensions, and look at it whole before it goes into a page.
- Write down the model, prompt, settings and price for each file. An image that rendered but that you throw away is still billed; a failed one is not.
If Codex cannot reach the server
- No connection: confirm the
/mcpaddress, that the key is active, and that Codex really seesKADRARIS_API_KEY. - Auth or balance errors: check the cap on the key and the balance on the account.
- Rejected input: have Codex read
get_modelagain for this model rather than reusing values from another. - Answer broke off mid-run: find the task id Codex stored and check it before generating again.
More agent setups: AI agents. To keep API rules in the repo for every future session, add AGENTS.md. OpenAI's own page on the feature: Codex MCP documentation.
Questions
Which image model should Codex use for a website hero?
GPT Image 2.5 is a solid start, with one flat rate per image. If the hero has text in it, compare with Nano Banana Pro; the image generator ranking shows how both handled lettering in my test.
Do I pay twice, for Codex and for Kadraris?
Codex's own model is billed by OpenAI as usual. Kadraris charges only for the images and other jobs that go through its tools, from your Kadraris balance.
Can I stop Codex from generating more than I planned?
Yes, twice over. Tell it to wait for approval after estimate_cost, and give its key a monthly cap in the dashboard. Past the cap, requests are refused.


























