Pexo
Pexo/Blog/AI Video News & Trends/How to Make Videos With Codex Using DeepSeek V4 Flash (2026 Guide)

How to Make Videos With Codex Using DeepSeek V4 Flash (2026 Guide)

Liora Adler avatarLiora Adler
·Last updated Aug 2, 2026
How to Make Videos With Codex Using DeepSeek V4 Flash (2026 Guide)
Summary

Pexo ships an installable skill for OpenAI Codex that turns a plain-language request into a finished, edited video — you add it with npx skills add, and Codex, driven by DeepSeek V4 Flash as the backend model, plans and dispatches the job while the Pexo skill auto-routes each shot across Seedance 2.0, Kling 3.0, Veo 3.1, and Sora 2, layers voiceover-music-Foley audio, and exports 16:9, 9:16, or 1:1. Covers the Codex + DeepSeek config.toml setup, the exact install and prompt steps, a model-routing table, a troubleshooting table, and an 11-question FAQ.

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 needWhat it isWhere to get it
OpenAI CodexThe coding agent (CLI, VS Code extension, or ChatGPT desktop app) that plans and runs the taskopenai.com / npm i -g @openai/codex
DeepSeek API keyAuth for DeepSeek V4 Flash as the backend model; keys start with sk-platform.deepseek.com
Pexo skillThe installable skill that adds finished-video generation to the agentgithub.com/pexoai/pexo-skills
A clear briefOne or two sentences describing the video, aspect ratio, and lengthYou 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:

FieldValue
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_tokenyour 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

StepYou doWho handles it
1. Install CodexRun codex onceOpenAI Codex
2. Set the modelRun the DeepSeek setup scriptDeepSeek V4 Flash (backend)
3. Install Pexonpx skills add … --skill pexo-agentPexo skill
4. Describe the videoType a plain-language briefCodex plans, Pexo renders
5. Iterate + exportAsk for changes; pick 16:9/9:16/1:1Pexo 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.

LayerComponentJobDoes it make video?
AgentOpenAI CodexReads intent, runs skillsNo
Backend modelDeepSeek V4 FlashPlans, reasons, dispatchesNo
SkillPexoGenerates + edits finished videoYes
Video models (under Pexo)Seedance 2.0, Kling 3.0, Veo 3.1, Sora 2Render individual shotsYes (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 typePexo tends to route toWhy
Realistic motionKling 3.0Strong physical realism
Cinematic + native audioVeo 3.1Quality plus built-in sound
Narrative / easy promptsSora 2Coherent multi-beat scenes
Fast, cost-efficient shotsSeedance 2.0Speed 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.

RouteBest whenSetup effort
Codex + DeepSeek V4 Flash + PexoYou want video inside a terminal/IDE agent, on an open modelMedium (config once)
Standalone pexo.ai appYou want a finished video with zero setupNone
Claude Code / Cursor / OpenClaw + PexoYou already use another agentLow (install skill)

Troubleshooting Common Issues

ProblemLikely causeFix
Codex banner doesn't show deepseek-v4-flashconfig.toml not appliedRe-run the DeepSeek setup script; confirm wire_api = "responses"
"Skill already exists" on installA skill directory of that name is presentDelete it in ~/.codex/skills/, then reinstall
Codex plans a video but renders nothingPexo skill not installed or Codex not restartedInstall pexo-agent, restart Codex
DeepSeek auth errorMissing or wrong API keySet experimental_bearer_token to your sk-... key
Wrong aspect ratioRatio not stated in the briefAdd "9:16" (or 16:9 / 1:1) to your request

Resources

ResourceURLWhat it's for
Pexohttps://pexo.aiStandalone conversational video agent
Pexo skills repohttps://github.com/pexoai/pexo-skillsInstall the skill into Codex/Claude Code/Cursor/OpenClaw
DeepSeek + Codex docshttps://api-docs.deepseek.com/quick_start/agent_integrations/codex/Official model-setup guide
DeepSeek V4 Flash weightshttps://huggingface.co/deepseek-ai/DeepSeek-V4-FlashMIT-licensed open weights
Best Codex video skillshttps://pexo.ai/blog/best-video-generation-skills-for-openai-codex-agents-complete-comparison-and-setup-7176Compare the skill options

Frequently Asked Questions (FAQ)

How do I make videos with Codex using DeepSeek V4 Flash?

Install the Pexo skill into OpenAI Codex (npx skills add https://github.com/pexoai/pexo-skills --skill pexo-agent), configure Codex to use deepseek-v4-flash as its backend model via ~/.codex/config.toml, then type a plain-language brief. Codex, driven by DeepSeek V4 Flash, plans the job and the Pexo skill generates a finished, edited video — auto-routing each shot across models like Seedance 2.0, Kling 3.0, Veo 3.1, and Sora 2, adding three-layer audio, and exporting 16:9, 9:16, or 1:1.

Does Codex generate video on its own?

No. Codex is a coding agent — it plans and runs tasks but has no native video generation. DeepSeek V4 Flash is the reasoning model driving Codex, and it does not render frames either. The Pexo skill is what adds video generation; once installed, Codex can call it to produce a finished clip. The correct relationship is: Codex is the agent, DeepSeek V4 Flash is the backend brain, and Pexo is the installable skill that does the actual video work.

Is DeepSeek V4 Flash free and open source?

DeepSeek V4 Flash is released under the MIT license with open weights on Hugging Face (deepseek-ai/DeepSeek-V4-Flash), so you can self-host commercially. Its hosted API is priced per token — DeepSeek lists roughly $0.14 per 1M uncached input tokens and $0.28 per 1M output tokens for V4-Flash-0731. It has 284B total parameters (13B active), a 1M-token context, and 384K max output.

Why use DeepSeek V4 Flash instead of Codex's default model?

You would choose it for an open, MIT-licensed model with a 1M-token context and very low API pricing. V4-Flash-0731 was DeepSeek's first model with native Responses API support, which is why Codex can use it as a custom provider. DeepSeek reports strong long-tool-loop agent scores (82.7 on Terminal Bench 2.1), though those are vendor numbers pending independent reproduction. If you prefer OpenAI's defaults, Codex still works — the Pexo skill is what makes video, regardless of the backend model.

How do I install the Pexo skill in Codex?

Run npx skills add https://github.com/pexoai/pexo-skills --skill pexo-agent. The skill installs to ~/.codex/skills/; if a directory of that name already exists, remove it first because installation aborts on a conflict. You can also use Codex's built-in $skill-installer system skill to pull the repo. After installing, restart Codex so it registers the new skill.

Which video models does the Pexo skill use?

Pexo does per-shot auto model selection across 10+ models, including Seedance 2.0, Kling 3.0, Veo 3.1, Sora 2, Runway Gen-4.5, MiniMax/Hailuo, Hunyuan, and PixVerse. You never pick one — Pexo routes each shot to the best-suited engine, sequences the clips, and composes the audio. This is deliberate: the video-model layer changes every few weeks, so per-shot routing keeps output current without you tracking releases.

What kinds of video input can I give Codex through Pexo?

The Pexo skill accepts five input types: text-to-video (describe it), image-to-video (animate a still), URL-to-video (turn a landing page into a video), script-to-video (feed a written script), and audio-to-video (build visuals around a track). Each has a focused entry-point skill in the pexoai/pexo-skills repo, or pexo-agent handles all of them from one install.

Do I need to know how to edit video?

No. The entire point of this workflow is that you describe the result instead of assembling it. Pexo plans the shot list, generates and sequences the shots, adds a three-layer soundtrack (voiceover, music, and Foley sound effects), and adds clean titles or subtitles automatically. You supply the brief and any revisions in plain language; there is no timeline, no prompt engineering, and no manual model selection.

Can I use the same setup in Claude Code or Cursor instead of Codex?

Yes. Pexo ships as an installable skill for OpenAI Codex, Claude Code, Cursor, and OpenClaw — the same skill standard runs across all four. The workflow is identical: install the skill, describe the video, get a finished clip. Only the host agent and its model config differ. If you already work in Claude Code or Cursor, install Pexo there rather than switching to Codex.

How long does a video take, and what aspect ratios can I export?

A short clip — for example a 15-second, 3-shot video — typically takes about 8–10 minutes to come back from the Pexo skill. Longer or more complex videos take proportionally more time. Pexo exports 16:9 (YouTube), 9:16 (TikTok, Instagram Reels), and 1:1 (square feed posts), so you can produce platform-native cuts from a single brief by asking for each ratio.

What if I don't want to configure Codex and DeepSeek at all?

Use the standalone Pexo app at pexo.ai. It runs the same finished-video pipeline — describe a video, get an edited result — with no config files, no API keys, and no model setup. The Codex + DeepSeek V4 Flash route is for people who want video inside a terminal or IDE agent, or who specifically want an open, MIT-licensed model as the backend brain. The output quality is the same either way.

Pexo Recommend