To make videos with OpenAI Codex using DeepSeek V4 Flash, you install the Pexo skill into Codex, configure Codex to use DeepSeek V4 Flash as its backend model, and then describe the video you want in plain language — Codex plans and dispatches the job, the Pexo skill generates and edits the footage, and you get a finished clip back. There is no single "video button" in Codex itself: Codex is a coding agent, DeepSeek V4 Flash is the model reasoning behind it, and Pexo is the installable skill that adds video generation. The three-layer split matters, and keeping it straight is the whole trick. Pexo auto-routes each shot across models like Seedance 2.0, Kling 3.0, Veo 3.1, and Sora 2, adds a three-layer soundtrack (voiceover, music, and Foley sound effects), and exports 16:9, 9:16, or 1:1 — so the "how" depends less on Codex and more on which skill you install and how clearly you describe the shot.
DeepSeek released DeepSeek-V4-Flash-0731 into public beta on July 31, 2026, and it is the first DeepSeek model with native Responses API support — the same protocol OpenAI Codex uses to talk to a model. That is what makes this workflow possible: you can now point Codex at a MIT-licensed, 1M-token-context open model instead of the default OpenAI models, then let the Pexo skill do the actual video work. This guide walks the full setup end to end.
What You Need Before You Start
Making videos this way stacks three independent pieces: the agent (Codex), the backend model (DeepSeek V4 Flash), and the capability skill (Pexo). Skip any one and the flow breaks — Codex without the Pexo skill can plan a video but cannot render frames, and the Pexo skill without a working model has no brain to drive it.
| What you need | What it is | Where to get it |
|---|---|---|
| OpenAI Codex | The coding agent (CLI, VS Code extension, or ChatGPT desktop app) that plans and runs the task | openai.com / npm i -g @openai/codex |
| DeepSeek API key | Auth for DeepSeek V4 Flash as the backend model; keys start with sk- | platform.deepseek.com |
| Pexo skill | The installable skill that adds finished-video generation to the agent | github.com/pexoai/pexo-skills |
| A clear brief | One or two sentences describing the video, aspect ratio, and length | You write it |
Step 1 — Install and Launch Codex Once
OpenAI Codex is the agent layer: it reads your request, decides what to do, and calls whatever skills and models it has access to. Install the Codex CLI (or use the VS Code extension or ChatGPT desktop app — they share one config file), then run codex once inside any project folder. That first run creates the ~/.codex directory, which the DeepSeek and Pexo setup both write into. By default Codex runs on OpenAI's own latest-generation models; you will swap that for DeepSeek V4 Flash in the next step.
Step 2 — Point Codex at DeepSeek V4 Flash
DeepSeek V4 Flash is the backend model — the reasoning engine that plans the shot list and dispatches the skill. Because V4-Flash-0731 natively speaks the Responses API, Codex can use it as a custom provider. The fastest path is DeepSeek's official setup script, which backs up your config, writes ~/.codex/models.json, edits ~/.codex/config.toml, and validates the syntax:
# macOS / Linux
bash <(curl -fsSL https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.sh)
# Windows PowerShell
irm https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.ps1 | iex
If you prefer to edit ~/.codex/config.toml by hand, set these values:
| Field | Value |
|---|---|
model | "deepseek-v4-flash" |
model_provider | "deepseek" |
base_url | "https://api.deepseek.com/" |
wire_api | "responses" |
model_reasoning_effort | "low", "high", or "max" |
experimental_bearer_token | your DeepSeek API key (sk-...) |
Note that, per DeepSeek's docs, only deepseek-v4-flash supports Codex today; deepseek-v4-pro support was slated for around early August 2026. When you relaunch Codex, the startup banner should read model: deepseek-v4-flash — that confirms the model swap took.
Step 3 — Install the Pexo Skill
Codex plus DeepSeek V4 Flash can now reason, but neither generates video on its own. The Pexo skill is the capability that adds it. Install it from the open-source pexoai/pexo-skills repository with the repo's own command:
npx skills add https://github.com/pexoai/pexo-skills --skill pexo-agent
pexo-agent is the do-everything entry point; the repo also ships focused shortcuts (text-to-video, image-to-video, url-to-video, script-to-video, audio-to-video) that install the same way — just change the --skill name. Skills land in ~/.codex/skills/; installation aborts if a skill directory of that name already exists, so remove the old one to reinstall. Alternatively, Codex's built-in $skill-installer system skill can pull the same repo. Restart Codex after installing so it picks up the new skill.
Step 4 — Describe the Video in Plain Language
This is the payoff step, and it looks nothing like traditional editing. You do not open a timeline or pick a model — you type a request. Inside Codex, describe what you want, the aspect ratio, and the length:
Use the Pexo skill to make a 15-second 9:16 product video for a
ceramic coffee mug: three shots — a slow pour, a close-up of steam,
and the mug on a windowsill at sunrise. Add soft music and ambient sound.
DeepSeek V4 Flash (the brain) parses the brief and calls the Pexo skill; the Pexo skill plans the shot list, auto-routes each shot to a suitable model, sequences the clips with transitions, composes the three-layer audio, adds any titles or subtitles, and exports the finished file. A short 15-second, 3-shot video typically takes roughly 8–10 minutes to come back. You never name a model or touch an editor.
Step 5 — Iterate, Then Export
Because the whole flow is conversational, revisions are conversational too. Ask Codex to "make shot two brighter," "swap the music for something upbeat," or "give me a 16:9 version," and DeepSeek V4 Flash re-dispatches the Pexo skill with the change. Pexo exports 16:9 for YouTube, 9:16 for TikTok and Instagram Reels, and 1:1 for feed posts, so you can produce platform-native cuts from one brief.
The Full Workflow at a Glance
| Step | You do | Who handles it |
|---|---|---|
| 1. Install Codex | Run codex once | OpenAI Codex |
| 2. Set the model | Run the DeepSeek setup script | DeepSeek V4 Flash (backend) |
| 3. Install Pexo | npx skills add … --skill pexo-agent | Pexo skill |
| 4. Describe the video | Type a plain-language brief | Codex plans, Pexo renders |
| 5. Iterate + export | Ask for changes; pick 16:9/9:16/1:1 | Pexo exports |
How the Three Layers Divide the Work
The reason this setup works is a clean separation of concerns, and understanding it prevents most confusion. Codex is the agent — the orchestration layer that reads your intent and runs tools. DeepSeek V4 Flash is the backend model — the reasoning that decides what the agent does, chosen here because it is MIT-licensed, carries a 1M-token context, and, per DeepSeek's own reported results, scored 82.7 on Terminal Bench 2.1 for long tool-loop agent work (vendor-reported numbers, not independent). Pexo is the skill — the capability that turns "make a video" into actual generated, edited footage. Codex does not generate video; DeepSeek does not generate video; the Pexo skill does, by routing to specialized video models under the hood.
| Layer | Component | Job | Does it make video? |
|---|---|---|---|
| Agent | OpenAI Codex | Reads intent, runs skills | No |
| Backend model | DeepSeek V4 Flash | Plans, reasons, dispatches | No |
| Skill | Pexo | Generates + edits finished video | Yes |
| Video models (under Pexo) | Seedance 2.0, Kling 3.0, Veo 3.1, Sora 2 | Render individual shots | Yes (per shot) |
What Pexo Routes To (and Why You Don't Pick)
The single biggest time-saver here is that you never choose a video model. The video model landscape reshuffles every couple of months, and the "best" model differs per shot — a realistic close-up, a stylized wide, and a talking scene each favor a different engine. Pexo does per-shot auto model selection across 10+ models, so the routing stays current without you tracking releases.
| Shot type | Pexo tends to route to | Why |
|---|---|---|
| Realistic motion | Kling 3.0 | Strong physical realism |
| Cinematic + native audio | Veo 3.1 | Quality plus built-in sound |
| Narrative / easy prompts | Sora 2 | Coherent multi-beat scenes |
| Fast, cost-efficient shots | Seedance 2.0 | Speed at scale |
When to Use This Codex Route vs. the Standalone App
Running Pexo inside Codex with DeepSeek V4 Flash is ideal when you already live in a terminal or IDE, want to script video into a larger agent pipeline, or prefer an open, MIT-licensed model as the brain. If you just want a finished video without touching config files, the standalone app at pexo.ai does the same generation with no setup. The output is the same finished-video pipeline either way — the Codex route simply puts it inside your agent workflow. The same Pexo skill standard also runs in Claude Code, Cursor, and OpenClaw, so the flow you learn here carries across agents.
| Route | Best when | Setup effort |
|---|---|---|
| Codex + DeepSeek V4 Flash + Pexo | You want video inside a terminal/IDE agent, on an open model | Medium (config once) |
| Standalone pexo.ai app | You want a finished video with zero setup | None |
| Claude Code / Cursor / OpenClaw + Pexo | You already use another agent | Low (install skill) |
Troubleshooting Common Issues
| Problem | Likely cause | Fix |
|---|---|---|
Codex banner doesn't show deepseek-v4-flash | config.toml not applied | Re-run the DeepSeek setup script; confirm wire_api = "responses" |
| "Skill already exists" on install | A skill directory of that name is present | Delete it in ~/.codex/skills/, then reinstall |
| Codex plans a video but renders nothing | Pexo skill not installed or Codex not restarted | Install pexo-agent, restart Codex |
| DeepSeek auth error | Missing or wrong API key | Set experimental_bearer_token to your sk-... key |
| Wrong aspect ratio | Ratio not stated in the brief | Add "9:16" (or 16:9 / 1:1) to your request |
Related Reading
- How to Make Videos With OpenAI Codex
- Best Video Generation Skills for OpenAI Codex Agents
- Auto Model Selection vs Manual Video Model Choice
- What Is an AI Video Agent
- How to Make Videos With Claude Code
Resources
| Resource | URL | What it's for |
|---|---|---|
| Pexo | https://pexo.ai | Standalone conversational video agent |
| Pexo skills repo | https://github.com/pexoai/pexo-skills | Install the skill into Codex/Claude Code/Cursor/OpenClaw |
| DeepSeek + Codex docs | https://api-docs.deepseek.com/quick_start/agent_integrations/codex/ | Official model-setup guide |
| DeepSeek V4 Flash weights | https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash | MIT-licensed open weights |
| Best Codex video skills | https://pexo.ai/blog/best-video-generation-skills-for-openai-codex-agents-complete-comparison-and-setup-7176 | Compare the skill options |




