Generate images and video in Codex
Codex makes no video, and images only in some sessions; add the Tokenify MCP server and it generates both from our models — it prices each generation, asks you before one that costs $1 or more, saves the file into your project, and can hand you a top-up link without leaving the conversation. From $0.018/image, prices as of 2026-11-29.
Use in your agent
Connect the Tokenify MCP server
Paste this into the agent’s chat:
Add the Tokenify MCP server for all my projects by running: claude mcp add --transport http --scope user tokenify https://api.tokenify.dev/mcp — then tell me to start a new conversation, where you will ask me to sign in.
Add the Tokenify MCP server by running: codex mcp add tokenify --url https://api.tokenify.dev/mcp — then tell me to restart Codex and sign in with Authenticate next to tokenify in Settings > MCP servers (in a terminal: codex mcp login tokenify).
In Claude (claude.ai or the desktop app): open Connectors, choose Add custom connector and enter https://api.tokenify.dev/mcp. Claude opens Tokenify to sign in. On a Team or Enterprise plan an owner adds it for the organisation.
A browser opens to sign in and pick the project to spend from. The agent quotes each generation and, by default, asks you before one that costs $1 or more.
In a terminal instead
claude mcp add --transport http tokenify https://api.tokenify.dev/mcp
codex mcp add tokenify --url https://api.tokenify.dev/mcp codex mcp login tokenify
No MCP in your client? Paste a prompt instead
With a key in TOKENIFY_API_KEY
Read https://www.tokenify.dev/agents.md — it describes the Tokenify API, at https://api.tokenify.dev. Use it to generate images, video or text, with the key in my TOKENIFY_API_KEY environment variable. Tell me the price before each call, and ask me first if this task's total could reach $1 or more, or if you cannot work out what a call will cost. Save every result into this project: decode an image that comes back inline, and download anything returned as a link, because links expire after 7 days.
Set it up
- Add the Tokenify MCP server. In the Codex app, paste this into the chat and Codex adds it itself:
Add the Tokenify MCP server by running: codex mcp add tokenify --url https://api.tokenify.dev/mcp — then tell me to restart Codex and sign in with Authenticate next to tokenify in Settings > MCP servers (in a terminal: codex mcp login tokenify).
Or from the menus: In the Codex app or IDE extension: Settings > MCP servers > Add server, choose Streamable HTTP, name it tokenify and enter https://api.tokenify.dev/mcp. Restart, then choose Authenticate next to it.
In a terminal
codex mcp add tokenify --url https://api.tokenify.dev/mcp codex mcp login tokenify
- Signing in opens a browser to pick the project whose balance Codex may spend, and its limits. Agent on another computer from your browser? Approve on whichever device you like. For Claude Code the page gives you a line to paste into its chat, and it finishes signing in itself; for Codex, sign in with codex mcp login --no-browser tokenify in a terminal and paste the sign-in URL the page gives you. Apps wait about five minutes for the sign-in, so approve within that.
- Ask for what you want, in your own words. Codex prices each generation first, asks you before one that costs $1 or more (the project's setting), and saves the file into your project; when the balance runs low it can hand you a link to top up.
No MCP? Use a key and a pasted prompt instead
- In the console, under Keys, create a key for the agent alone, with a daily budget, and put it in the environment Codex runs in:
export TOKENIFY_API_KEY=tk-live-… - Paste this into Codex:
Read https://www.tokenify.dev/agents.md — it describes the Tokenify API, at https://api.tokenify.dev. Use it to generate images, video or text, with the key in my TOKENIFY_API_KEY environment variable. Tell me the price before each call, and ask me first if this task's total could reach $1 or more, or if you cannot work out what a call will cost. Save every result into this project: decode an image that comes back inline, and download anything returned as a link, because links expire after 7 days.
The MCP reference lists the tools and the spending settings.
What it looks like
> Make a hero image for the landing page and save it to public/hero.jpg
● tokenify · estimate_cost generate_image, bytedance/seedream-5.0-flash
⎿ $0.018 for one image
● tokenify · generate_image
● Saved public/hero.jpg ($0.018)
> Now an 8-second clip of the product in use
● tokenify · estimate_cost generate_video, minimax/minimax-h3-economy, 720p, 8 s
⎿ $0.19 ($0.024 a second), under the $1 your project asks about
● tokenify · generate_video
● tokenify · get_job succeeded
● Saved public/demo.mp4An illustration of the MCP flow with today's prices: a quote, a yes for anything from $1, the file saved into your project. The agent's own words will differ.
What to ask for
- A hero image“A hero image for the landing page, wide, in our brand colours.”
- A social card“An Open Graph image for this blog post, landscape, with the title on it.”
- An app icon“A square app icon, flat, on a plain background.”
- A product clip“An 8-second clip of the app being used, for the README.”
Spending stays where you put it
- The server asks for you: a call that would cost at least the project's “Ask before spending” price — $1 unless you change it — is refused with its exact price, and goes through only once you agree to that price.
- A daily cap for agents, if you set one in the console under Settings → Agents, refuses a call that would take the day's agent spend past it, and reminders email the project's owners and admins as agents pass amounts you choose.
- Generated files are links that last 7 days, so the agent saves each one into your project.
What it costs
| For | Cheapest model | Price |
|---|---|---|
| An image | Seedream 5.0 Flash | $0.018 each |
| A second of 720p video | MiniMax H3 Economy | $0.024 |
Every model and size is on the image page and the video page.
Prices updated , from the catalogue the gateway bills from.
The call the agent makes
curl https://api.tokenify.dev/v1/images/generations \
-H "Authorization: Bearer $TOKENIFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedream-5.0-flash",
"prompt": "A still life of three pears, soft window light",
"size": "2K"
}'Or run Codex itself on our models
Codex speaks the Responses API, and we serve it on every chat model, so Codex can also run on our models rather than call them. A provider block in ~/.codex/config.toml:
model_provider = "tokenify"
model = "deepseek/deepseek-v4-flash"
[model_providers.tokenify]
name = "Tokenify"
base_url = "https://api.tokenify.dev/v1"
wire_api = "responses"
env_key = "TOKENIFY_API_KEY"The Codex reference has the rest, and the Responses API page lists what was measured on each model.
Questions people ask before signing up
Does Codex have to run on Tokenify for this?
No. The images and video come from our API whichever model Codex itself runs on, OpenAI's included. Running Codex on our models is a separate choice, at the end of this page.
Codex runs on a server and my browser is on my phone. How do I sign in?
In a terminal on the server, run codex mcp login --no-browser tokenify. It prints a sign-in link and asks for a Callback URL. Open the link on your phone, approve, choose "Codex is on another device", copy the sign-in URL and paste it at the prompt. Codex waits about five minutes.
Does it work under codex exec?
Yes, with the Tokenify tools approved for that run: codex exec has nobody to ask, so it refuses a tool call that spends ("MCP tool call requires approval"). Pass -c 'mcp_servers.tokenify.default_tools_approval_mode="approve"' to codex exec. In config.toml it would also stop Codex asking in your conversations.
Does Codex need network access for this?
Yes: the agent saves each result into your project with a shell command, and on the pasted-prompt path every call goes from the shell. In a sandbox that blocks the network, allow it for the session or run the command yourself.
Can Codex make images and video on its own?
Images, in some interactive sessions, with the model OpenAI gives it; video, no. Connected to the Tokenify MCP server it uses our image and video models instead, from any session, priced per call and saved into your project.
Is there an MCP server to install?
Yes, one command: codex mcp add tokenify --url https://api.tokenify.dev/mcp, then codex mcp login tokenify. Signing in opens a browser to pick the project whose balance Codex may spend, and its limits. The agent can then list the models, price a generation, generate images and video, read the balance and hand you a top-up link, all from the conversation. A client without MCP can use the pasted prompt instead.
How do I stop it spending more than I meant?
Over MCP, the project's settings decide it, and the server enforces them whatever the agent does: a call that would cost at least the "Ask before spending" price — $1 unless you change it — is refused until you agree to that price, and you can set a daily cap for agents and email reminders as they spend. With the pasted prompt instead, the prompt only asks the agent to check with you, so give it a key of its own with a daily budget, which the gateway enforces.
Does the free credit cover this?
It covers images. Video needs a project that has paid in at least $5 of top-ups and kept it, and a balance that covers the job when it is submitted.
How long are the files kept?
A generated image or video is a link that works for 7 days, so the agent saves each one into your project. Over the HTTP API an image can also come back in the response itself, and then exists nowhere else.
Last updated 2026-11-24. Prices come from the live catalogue at the time this page was built.