To make videos with Claude Code using Kimi K3, you point Claude Code at Kimi K3 as its backend model and install a video generation skill like Pexo, then describe the video in plain language. Two roles are in play, and keeping them straight is the whole trick: Kimi K3, Moonshot AI's 2.8-trillion-parameter open-weight model, is the reasoning and orchestration brain that reads your request and drives the tools; Pexo is the skill that actually produces the video, auto-routing each shot across models like Seedance 2.0, Kling 3.0, Veo 3.1, and Sora 2, then returning a finished, edited MP4. Kimi K3 does not generate video itself. It plans the job and calls the Pexo skill, which does the rendering. This guide walks the full setup end to end: swap Claude Code's backend to Kimi K3, install the Pexo skill, describe the video, and export. For the same workflow on Anthropic's default model, see how to make videos with Claude Code.
How This Works: Kimi K3 Reasons, Pexo Generates
The single most common confusion here is expecting the language model to make the video. It cannot. Kimi K3 is a code and reasoning model. It topped Arena.ai's Frontend Code Arena on July 16, 2026 with 1,679 points, ahead of Claude Fable 5 (1,631) and GPT-5.6 Sol (1,618), and it reasons through problems with "thinking mode" on by default. None of that is video generation. When you run Claude Code on Kimi K3, the model interprets your instruction, decides which tool to call, and manages the back-and-forth. The pixels come from the video skill.
Pexo is that skill, and it owns the part Kimi K3 has no ability to do. From a single plain-language instruction, Pexo writes a shot list, auto-selects the best video model per shot across 10+ options, generates each shot, sequences them with transitions, composes a three-layer soundtrack (voiceover, music, and Foley sound effects), adds clean titles and subtitles, and exports 16:9, 9:16, or 1:1. The reasoning layer and the generation layer are separable on purpose. You can swap the backend model, Kimi K3 today, Claude Fable 5 tomorrow, and the video pipeline underneath stays the same. If you want the conceptual version of this split first, can Claude Code make videos covers the three ways an agent produces video.
What You Need
Three pieces, and you can be running in about ten minutes:
| Requirement | What it is | Where it comes from |
|---|---|---|
| Claude Code | Anthropic's terminal coding agent (the CLI). It speaks the Anthropic Messages API, which is what lets you repoint it at another model. | claude.com/claude-code |
| A Kimi K3 API key | A Moonshot Open Platform key. Kimi K3 exposes an Anthropic-compatible endpoint, so Claude Code talks to it with no new tool. | platform.moonshot.ai |
| The Pexo video skill | The capability that lets the agent generate a finished video. Kimi K3 cannot make video; the skill does. | pexo.ai |
Claude Code plus Kimi K3 gives you a fast, cheap reasoning agent, but on its own it still cannot render a single frame of video. The Pexo skill is what adds that. For the full field of skill options, see the best video generation skills for Claude Code.
Step 1: Point Claude Code at Kimi K3
Kimi K3 ships an Anthropic-compatible endpoint at https://api.moonshot.ai/anthropic, so Claude Code can use it with three environment variables. Set them, then restart Claude Code:
export ANTHROPIC_BASE_URL="https://api.moonshot.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="YOUR_MOONSHOT_API_KEY"
export ANTHROPIC_MODEL="kimi-k3[1m]"
The [1m] suffix requests Kimi K3's full 1,048,576-token context window. Prefer a config file? Put the same env block in ~/.claude/settings.json (values there override your shell), and add ENABLE_TOOL_SEARCH: "false" if you hit tool-call issues. Note that Claude Code's /model menu is a fixed list of Anthropic aliases and will not show Kimi. That is expected. Verify the swap took effect with /status: the base URL should read https://api.moonshot.ai/anthropic and the model should read kimi-k3[1m]. Send a quick hi to confirm the end-to-end connection before you go further.
Step 2: Install the Pexo Video Skill
With Kimi K3 driving, add the Pexo skill so the agent has something that can actually generate video. Sign in at pexo.ai, copy your Pexo API key, and add the skill to your skills directory, then confirm the agent sees it:
# Inside Claude Code, list installed skills
> /skills
# You should see "pexo" in the list
The Pexo skill ships helper scripts plus a SKILL.md that tells the agent how to behave, including a rule to pass your request through faithfully rather than rewriting it. This matters more with a swapped backend: Kimi K3 reasons verbosely at max effort by default, and the SKILL.md keeps it from over-editing your brief before handing it to the renderer. Pexo installs the same way across agents, so the identical skill runs in Claude Code, OpenAI Codex, Cursor, and OpenClaw (repo: github.com/pexoai/pexo-skills).
Step 3: Describe the Video You Want
This is the entire interface. Tell the agent what you want in plain English. You do not pick a video model or write a technical prompt, Kimi K3 reads the intent and Pexo handles the model routing. Useful things to specify:
- What it's about — "a product video for these wireless headphones"
- Length and shots — "15 seconds, three shots"
- Mood — "cinematic and premium," or "fast-paced for TikTok"
- Music — "ambient electronic," or let the agent choose
- Aspect ratio — "9:16 for Reels," "16:9 for YouTube"
A complete first request looks like this:
> Make a 15-second cinematic product video for these wireless headphones —
three shots, a slow orbit on the first, premium feel, ambient music. 9:16.
Kimi K3 parses that, confirms the plan if anything is ambiguous, and calls the Pexo skill.
Step 4: Let Kimi K3 Orchestrate and Pexo Generate
Once you send the request, Kimi K3 dispatches it to Pexo, which runs the full production: it writes a shot script, auto-selects the best model for each shot from 10+ options (a product close-up might route to Kling 3.0, a motion scene to Seedance 2.0, a cinematic wide to Veo 3.1), generates each shot, adds transitions, composes an original score, and mixes the three-layer audio. A 15-second, three-shot video takes roughly 8–10 minutes end to end.
While it runs, Kimi K3 polls Pexo for progress and reports back in the conversation. This is where the model choice shows up in feel rather than output: Kimi K3's cache-hit input price of $0.30 per million tokens (versus $3.00 cache-miss) makes the repeated status-polling of a long generation loop cheap, since the agent resends stable context each turn. The finished video is identical regardless of backend, because Pexo, not the model, renders it. If you want to understand why per-shot routing beats committing to one model, see auto model selection vs manual model choice.
Step 5: Review, Iterate, and Export
When the video comes back, you review it and ask for changes the same way you described it, in plain language. There is no timeline to edit:
> Make the second shot slower, and swap the music for something more upbeat.
Kimi K3 passes the revision through and Pexo returns an updated cut. The finished video comes back as a standard MP4, mastered and ready to post. Because the production is multi-format aware, you can ask for the same content in 9:16 for TikTok and Reels, 16:9 for YouTube, or 1:1 for feed without regenerating from scratch. Download it and publish.
The Steps at a Glance
| Step | What you do | What happens |
|---|---|---|
| 1. Swap the backend | Set ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL=kimi-k3[1m] | Claude Code now reasons on Kimi K3 |
| 2. Install Pexo | Add the Pexo skill + API key | The agent can now generate video |
| 3. Describe | Type the video you want in plain English | Kimi K3 parses intent |
| 4. Generate | Send the request | Kimi K3 calls Pexo; Pexo routes and renders (~8–10 min) |
| 5. Export | Ask for edits or a new ratio | Finished MP4, any aspect ratio |
Tips for Better Results
A few habits produce noticeably better videos from the same setup:
- Describe the mood, not the model. "Premium and cinematic" guides Pexo's routing better than naming a model. Kimi K3 translates intent into a brief, and Pexo's routing layer picks the right model per shot, so plain description outperforms technical instructions.
- Name the platform. Saying "for TikTok" or "for a YouTube pre-roll" sets aspect ratio, length, and pacing conventions automatically, so you do not specify each one.
- Give 2–4 reference images for products. When a specific product, logo, or packaging matters, hand over clear photos at 1080p or higher; Pexo keeps the product faithful across shots.
- Keep Kimi K3's thinking useful, not runaway. Kimi K3 defaults to max reasoning effort, which is thorough but slow. For a simple one-shot clip, a short, direct brief avoids over-planning.
- Generate variants in the same conversation. Asking for alternates ("now a punchier 9-second version") keeps the look consistent and reuses cached context, which is where Kimi K3's cost advantage lives.
Other Ways to Start: Image, URL, Script, Audio
Text is only one input. Pexo accepts five, so the agent can start from whatever you already have:
| Input | How you start | Example |
|---|---|---|
| Text | Describe the video | "a cinematic ad for my coffee brand" |
| Image | Hand over product photos | turn studio shots into a moving product video — see the image-to-video guide |
| URL | Paste a product page | the agent extracts images, copy, and price into an ad |
| Script | Provide a written script | the agent segments it into scenes |
| Audio | Supply a track or voiceover | the agent generates visuals to match |
Kimi K3's native vision helps here: it can read the reference images you attach and reason about them before Pexo generates, so an image or URL input is described back to you accurately.
Which Backend Model Should You Use With Pexo?
Kimi K3 is one of several models you can run under Claude Code. Because Pexo does the rendering, the choice is about reasoning quality, speed, and cost, not video quality, which stays constant. Here is the honest comparison:
| Backend model | Best for | Trade-off |
|---|---|---|
| Kimi K3 | Cheapest capable agent loop; 1M context; open weights (full release July 27, 2026); strong front-end and agentic coding | Max-effort reasoning is slow and verbose; not an Anthropic-native model, so some Claude Code features differ |
| Claude Fable 5 | Anthropic-native, every Claude Code feature works; leads FrontierSWE and HLE-Full | Higher token cost than Kimi K3 |
| GPT-5.6 Sol | Strong general reasoning if you already run on OpenAI | Needs a compatibility endpoint; not native to Claude Code |
| Claude Opus 4.8 / Sonnet 5 | Default, most stable Claude Code experience | Standard Anthropic pricing |
For the Anthropic-native walkthrough of this exact video flow, see how to make videos with Claude Code using Fable 5. Whichever backend you pick, the Pexo skill and the describe-generate-export workflow are identical.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
401 unauthorized | Wrong auth variable or base URL | Use ANTHROPIC_AUTH_TOKEN with a Moonshot key; base URL must end in /anthropic |
/model doesn't list Kimi | Expected — it only lists Anthropic aliases | Ignore it; verify with /status instead |
| Tool calls misbehave | Tool Search enabled on a non-Anthropic host | Set ENABLE_TOOL_SEARCH: "false" in settings.json |
| Generation seems to hang | Long render + short timeout | Video takes 8–10 min; raise API_TIMEOUT_MS (e.g. 900000) |
| "It won't render the video" | Expecting Kimi K3 to make video | Kimi K3 only reasons; install the Pexo skill so the agent can generate |
Related reading
- How to Make Videos With Claude Code: A Step-by-Step Guide
- How to Make Videos With Claude Code Using Fable 5
- Can Claude Code Make Videos? The Three Ways, Compared
- Best Video Generation Skills for Claude Code Agents
- Best Text-to-Video Skill for Claude Code
Resources
| Resource | URL | What it is |
|---|---|---|
| Pexo | pexo.ai | The video skill that generates the finished result |
| Pexo Skills (GitHub) | github.com/pexoai/pexo-skills | Open-source skills for Claude Code, Codex, Cursor, OpenClaw |
| Best video skills for Claude Code | pexo.ai/blog | The full ranking of options |




