New: AI voiceover + auto-captions - script to captioned video in one API call. Read the announcement

Codex CLI markOpenAI

Generate videos in Codex CLI

One TOML table, and Codex can render video. Renderly runs a hosted MCP server, so Codex CLI renders from the templates you already built - and previews cost nothing.

5 free credits · no card · hosted MCP, nothing to install

Codex CLIexample session

You

scores/2026-08-18.json has last night's four fixtures. Render the match recap for each.

  1. renderly_list_projects

    Finds Match Recap in your library

    1 match · 37s · 9 dynamic variables

  2. renderly_get_variables

    Reads what the recap actually accepts

    9 variables · scorers is one text field, not a list

Your JSON keeps scorers as an array, so I will join them onto separate lines. Previewing the derby first.

  1. renderly_preview_render0 credits

    Checks fixture one for free

    resolved 8/9 · warning UNKNOWN_REPLACEMENT: referee

The template has no referee variable, so I dropped that field. Re-checking the same preview.

  1. renderly_preview_render0 credits

    Updates the same preview in place

    revision 2 · resolved 9/9 · no warnings · grid shows 4-1 on scene 3

Frames look right. renderly_create_render is not read-only, so Codex will ask you to approve: four fixtures, 1 credit each.

  1. renderly_create_render4 credits

    Renders all four, once you approve

    4 jobs queued · 37s each · 1 credit each

  2. renderly_get_render_status

    Polls the queue

    4/4 complete · four 1080p MP4s ready to download

2 previews, charged nothing4 credits spent, on the render alone

Codex CLI runs in a terminal inside your repository. It reads your files, runs commands in a sandbox, and asks before it does anything with a side effect. What it cannot do on its own is turn the data already sitting in that repository into a finished video. Renderly's hosted MCP server closes that gap from a single TOML table in ~/.codex/config.toml: no local process to supervise, no rendering stack to install. Codex can then list the templates and projects you have already designed, read which variables each one exposes, fill those variables from a JSON or CSV file in the working tree, and check the result before any credit is spent. Codex is built around approval, and that suits rendering. It puts a prompt in front of tools a server has not marked read-only, and renderly_create_render is annotated that way, so Codex stops and asks you first. A free preview turns that pause into a decision you can actually make: look at the frames, then approve. Type /mcp in the TUI to see the server and its ten tools listed.

Renderly is the rendering engine, not the publisher. It hands back a finished MP4 at a URL - where that file goes next is up to you or one of our no-code integrations. The same engine and the same credits drive the REST API, so nothing about a render differs because Codex CLI asked for it.

The free preview loop

Codex CLI can check its work before you pay for it

An agent filling in a template will get something wrong - a mistyped variable name, a headline too long for its line. Renderly gives it a way to find out for nothing. A preview takes the same arguments as a real render and resolves them exactly the same way, but produces no video and costs no credits.

  1. Preview0 credits
  2. Fix, preview again0 credits
  3. Once more0 credits
  4. Rendercredits charged

It can look at the frames

Append ?mode=grid and the preview page draws a labelled contact sheet spanning the whole video, as ordinary images. Any agent that can open a page and screenshot it can then see a collided caption or a wrong colour - the failures no validator catches.

?mode=grid

Or one exact moment

Append ?frame=N to check a specific instant, where N is the second you care about multiplied by the frame rate. The page publishes its own rate, so the agent works it out rather than guessing from the nearest tile on the grid.

?frame=N

And fix it in place

Pass the previewId back with corrected values and the same preview updates. The link never changes, so the agent reloads and looks again. A revision counter goes up each time, which is how it knows it is seeing its own latest attempt and not a cached earlier one.

previewId

The warning that saves the most credits. If a variable name does not match, Renderly ignores it silently and renders the authored default instead - so the video comes back looking fine and carrying the wrong text. A preview returns a resolved map of what actually applied plus an UNKNOWN_REPLACEMENT warning, which is how Codex CLI catches that before it becomes a charge.

Setup

Connect Renderly to Codex CLI

Codex takes a remote MCP server either from one command or from a TOML table you write yourself. Both end up in the same file, so pick whichever you prefer.

Any terminal - add the server
codex mcp add renderly --url https://renderly.video/api/mcp
Codex writes the table, probes the endpoint, detects OAuth and opens the browser sign-in straight away.
~/.codex/config.toml
[mcp_servers.renderly]
url = "https://renderly.video/api/mcp"
tool_timeout_sec = 900
default_tools_approval_mode = "writes"
The same table the command writes, plus two settings worth adding by hand. A bare url is all Streamable HTTP needs, and default_tools_approval_mode accepts auto, prompt, writes or approve.
~/.codex/config.toml - with a Renderly API key instead
[mcp_servers.renderly]
url = "https://renderly.video/api/mcp"
bearer_token_env_var = "RENDERLY_API_KEY"
tool_timeout_sec = 900
Codex sends the key from your environment as a bearer token, so it never lands on disk. Good for a headless build box.
Any terminal - check it worked
codex mcp list
Add --json for the raw shape. Inside the TUI, /mcp does the same.
  1. Run the add command, or paste the [mcp_servers.renderly] table into ~/.codex/config.toml yourself. If CODEX_HOME is set, that directory replaces ~/.codex.

  2. Complete the browser sign-in. The add command starts it for you; if you edited the file by hand, run codex mcp login renderly.

  3. Add tool_timeout_sec = 900 to the table. The default is 60 seconds, which a render will exceed.

  4. Run codex mcp list, or type /mcp in the TUI, and check that renderly is connected with its ten tools listed.

  5. Ask it something small first, such as: list my Renderly projects and show me the variables on the match recap one.

Either a browser sign-in or an API key

Both work here. codex mcp add ... --url probes the endpoint first, sees Renderly's 401 and its www-authenticate header, prints "Detected OAuth support. Starting OAuth flow" and opens the browser sign-in there and then, so OAuth costs you nothing extra. On a headless box use bearer_token_env_var = "RENDERLY_API_KEY" instead: Codex sends your rnd_ key as a bearer token and reads it from the environment, so the secret never lands in the file. Codex tries bearer tokens and explicit headers before falling back to OAuth.

How this was checked. Server verified live on 2026-08-19: an unauthenticated POST returns 401 with an RFC 9728 challenge, WorkOS AuthKit advertises Dynamic Client Registration, and all ten tools are registered. The setup below was confirmed against OpenAI's current MCP documentation and survived an independent adversarial recheck on the same date. Nobody here drove Codex CLI end to end. OpenAI’s documentation

The surface

Ten tools Codex CLI gets

You never call these by hand. Codex CLI picks the right one from what you asked for. They are listed because it is worth knowing which of them can cost you money - and that seven of the ten cannot.

They are thin wrappers over the same service layer the public REST API uses, so the two surfaces cannot drift apart.

Renderly MCP tools, what each does, and whether it costs credits
ToolWhat it doesCost
renderly_whoamiConnectConfirms the connection and reports your credit balancefree
renderly_list_projectsFindLists your own projects that have something to personalisefree
renderly_list_templatesFindLists the public system templatesfree
renderly_get_variablesFindReads which fields a template or project accepts, and their current valuesfree
renderly_preview_renderCheckResolves your values exactly as a render would, without producing a video - returns a public preview link, what actually applied, a credit quote and any warningsfree
renderly_create_renderRenderRenders the video. Annotated as not read-only, so clients ask before calling itcredits
renderly_get_render_statusTrackPolls the job and returns the finished video URLfree
renderly_generate_captionsAdd AITranscribes audio into word-synced captions you can drop straight onto a layercredits
renderly_generate_voiceoverAdd AITurns a script into narration saved to your media librarycredits
renderly_get_ai_jobAdd AIPolls a captions or voiceover job for its resultfree

Why Codex CLI

What this client is good at

Codex gives each MCP server its own approval setting. Inside the [mcp_servers.renderly] table you can set default_tools_approval_mode, whose "writes" value prompts only for tools the server has not marked read-only, so which calls interrupt you follows the server's own annotations rather than one blanket rule for every tool. Renderly annotates renderly_create_render as not read-only, and that is the call which spends credits, so it always stops for a human. Codex also keeps one ~/.codex/config.toml for the CLI, the IDE extension and the ChatGPT desktop app, so the wiring follows you from a terminal in the repo to the desktop window with no second setup. One thing to fix up front: tool_timeout_sec defaults to 60 seconds, which is short for a render.

Questions people actually hit

Why is there no JSON snippet for Codex, and what goes in the [mcp_servers.renderly] table?
Codex configures MCP in TOML, not JSON, so the camelCase mcpServers object other clients use does not apply here. The header is [mcp_servers.renderly] and the only key a remote server needs is a bare url. There is no documented type or transport key to set: Codex tells the two transports apart by which key you supply, a command for a local stdio server or a url for a Streamable HTTP one like Renderly. Supply the url and the transport is settled, so leave the invented keys out.
Do I have to edit config.toml by hand, and where does codex mcp add write to?
No. codex mcp add renderly --url https://renderly.video/api/mcp writes the table for you in ~/.codex/config.toml, then probes the endpoint: Renderly answers 401 with a www-authenticate header, Codex prints "Detected OAuth support. Starting OAuth flow" and runs the browser login immediately. If CODEX_HOME is set, that directory replaces ~/.codex, so the config file and the logs in $CODEX_HOME/log move with it. Note that the MCP guide page still shows only the stdio form of codex mcp add; the --url flag landed in the CLI itself, so trust the binary over that page.
Can I keep the Renderly server in the repo rather than my home directory?
Yes. Put the same [mcp_servers.renderly] table in .codex/config.toml at the project root and Codex loads it for that project only. For a sports desk that is tidy: the repo then carries the scores JSON and the Renderly wiring together. Two catches. Project-scoped config is loaded for trusted projects only, so a fresh clone nobody has trusted yet quietly has no renderly server at all. And do not commit a key; use bearer_token_env_var so the secret stays in the environment, since OAuth credentials are stored outside the repo anyway.
I added Renderly in the terminal. Why has it appeared in the ChatGPT desktop app too?
Because they read the same file. The Codex CLI, the IDE extension and the ChatGPT desktop app all share ~/.codex/config.toml, so adding renderly once configures all three, and the OAuth sign-in carries across as well. The flip side is that a mistake propagates the same way, so restart after editing and check /mcp again. If you would rather not touch the file, the TUI can do it: type /mcp, open the gear menu, choose Add server, name it renderly, pick Streamable HTTP and paste the URL. It writes the same table.
A render call times out in Codex but the video turns up anyway. What is going on?
tool_timeout_sec defaults to 60 seconds per MCP tool call and startup_timeout_sec to 10, and a 37-second recap takes longer than a minute to render. Codex abandons the call while the job carries on happily on our side. Put tool_timeout_sec = 900 in the [mcp_servers.renderly] table. Better still, let Codex call renderly_create_render and then poll renderly_get_render_status, which returns straight away. While you are in that table, default_tools_approval_mode = "writes" keeps the prompt on renderly_create_render, which is the call that spends credits.

The same server, in every other client

One endpoint, one account, one credit balance. Only the wrapper changes.

Using something not listed? Any client that speaks remote MCP over Streamable HTTP can connect to https://renderly.video/api/mcp - these pages exist because the setup differs, not the server.

Let Codex CLI render the next one

Build a template once, then describe what you want. Previews are free, so the first thing you spend a credit on is a video you have already seen.