Pexo
Pexo/Blog/AI Video News & Trends/How to Make Videos With Claude Code Using Kimi K3: A Step-by-Step Guide

How to Make Videos With Claude Code Using Kimi K3: A Step-by-Step Guide

Liora Adler avatarLiora Adler
·Last updated Jul 21, 2026
How to Make Videos With Claude Code Using Kimi K3: A Step-by-Step Guide
Summary

A step-by-step guide to making AI videos with Claude Code while running Kimi K3 as the backend model. Install the Pexo skill so Claude Code can produce a finished, multi-shot video; Kimi K3 handles the reasoning and orchestration, and Pexo auto-routes each shot across video models like Seedance 2.0, Kling 3.0, Veo 3.1, and Sora 2. Covers pointing Claude Code at Moonshot's Anthropic-compatible endpoint, the env-var and settings.json config, the describe-generate-export workflow, a backend-model decision table, troubleshooting, and an 11-question FAQ.

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:

RequirementWhat it isWhere it comes from
Claude CodeAnthropic'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 keyA 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 skillThe 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

StepWhat you doWhat happens
1. Swap the backendSet ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL=kimi-k3[1m]Claude Code now reasons on Kimi K3
2. Install PexoAdd the Pexo skill + API keyThe agent can now generate video
3. DescribeType the video you want in plain EnglishKimi K3 parses intent
4. GenerateSend the requestKimi K3 calls Pexo; Pexo routes and renders (~8–10 min)
5. ExportAsk for edits or a new ratioFinished 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:

InputHow you startExample
TextDescribe the video"a cinematic ad for my coffee brand"
ImageHand over product photosturn studio shots into a moving product video — see the image-to-video guide
URLPaste a product pagethe agent extracts images, copy, and price into an ad
ScriptProvide a written scriptthe agent segments it into scenes
AudioSupply a track or voiceoverthe 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 modelBest forTrade-off
Kimi K3Cheapest capable agent loop; 1M context; open weights (full release July 27, 2026); strong front-end and agentic codingMax-effort reasoning is slow and verbose; not an Anthropic-native model, so some Claude Code features differ
Claude Fable 5Anthropic-native, every Claude Code feature works; leads FrontierSWE and HLE-FullHigher token cost than Kimi K3
GPT-5.6 SolStrong general reasoning if you already run on OpenAINeeds a compatibility endpoint; not native to Claude Code
Claude Opus 4.8 / Sonnet 5Default, most stable Claude Code experienceStandard 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

ProblemLikely causeFix
401 unauthorizedWrong auth variable or base URLUse ANTHROPIC_AUTH_TOKEN with a Moonshot key; base URL must end in /anthropic
/model doesn't list KimiExpected — it only lists Anthropic aliasesIgnore it; verify with /status instead
Tool calls misbehaveTool Search enabled on a non-Anthropic hostSet ENABLE_TOOL_SEARCH: "false" in settings.json
Generation seems to hangLong render + short timeoutVideo takes 8–10 min; raise API_TIMEOUT_MS (e.g. 900000)
"It won't render the video"Expecting Kimi K3 to make videoKimi K3 only reasons; install the Pexo skill so the agent can generate

Resources

ResourceURLWhat it is
Pexopexo.aiThe video skill that generates the finished result
Pexo Skills (GitHub)github.com/pexoai/pexo-skillsOpen-source skills for Claude Code, Codex, Cursor, OpenClaw
Best video skills for Claude Codepexo.ai/blogThe full ranking of options

Frequently Asked Questions (FAQ)

How do I make videos with Claude Code using Kimi K3?

Install the Pexo video skill, then point Claude Code at Kimi K3 as its backend model by setting ANTHROPIC_BASE_URL to Moonshot's Anthropic-compatible endpoint and ANTHROPIC_MODEL to kimi-k3[1m]. Describe the video in plain language. Kimi K3 reads your request and orchestrates; Pexo writes a shot list, auto-selects video models, generates the shots, mixes audio, and returns a finished MP4 in about 8–10 minutes for a 15-second, three-shot video. Kimi K3 does not render the video itself; the Pexo skill does.

Can Kimi K3 generate video on its own?

No. Kimi K3 is a 2.8-trillion-parameter code and reasoning model from Moonshot AI. It has native vision and can read images, but it does not produce video frames. Inside Claude Code it acts as the reasoning and orchestration backend: it interprets your instruction and calls a video generation skill. The actual video comes from that skill, Pexo in this guide, which routes each shot to the best-suited video model like Seedance 2.0, Kling 3.0, or Veo 3.1.

How do I set Kimi K3 as the backend model in Claude Code?

Set three environment variables and restart Claude Code: ANTHROPIC_BASE_URL="https://api.moonshot.ai/anthropic", ANTHROPIC_AUTH_TOKEN="YOUR_MOONSHOT_API_KEY", and ANTHROPIC_MODEL="kimi-k3[1m]". You can put the same block in ~/.claude/settings.json instead, where the values override your shell. Claude Code's /model menu will not list Kimi, which is expected; confirm the swap with /status, which should show the Moonshot base URL and kimi-k3[1m] as the model.

Why doesn't the /model menu show Kimi K3?

Claude Code's /model command shows a fixed list of Anthropic model aliases (Opus, Sonnet, Haiku, and so on). It does not read your custom endpoint, so Kimi K3 never appears there, and you do not need to select anything in that menu. The model is chosen entirely by your ANTHROPIC_MODEL variable. To verify Kimi K3 is active, run /status and check that the base URL points to Moonshot and the model reads kimi-k3[1m].

Which video models does Pexo use behind Claude Code?

With the Pexo skill, the agent auto-selects per shot from 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 name a model; Pexo's routing layer picks the best fit for each shot, so a product close-up and a cinematic wide can use different models in the same video. This routing is separate from your backend model choice: Kimi K3 orchestrates, Pexo picks the video engine.

Does using Kimi K3 change the quality of the video?

No. The video is rendered by the Pexo skill and the video models it routes to, not by the backend language model. Swapping between Kimi K3, Claude Fable 5, or GPT-5.6 Sol changes reasoning speed, cost, and how the agent handles your conversation, but the finished footage comes from the same video pipeline. Choose the backend for reasoning quality, context window, and price.

Is Kimi K3 cheaper than running Claude Code on Anthropic models?

Often, yes, for agent loops. Kimi K3 is priced at $3 per million input tokens and $15 per million output tokens, dropping to $0.30 per million on cached input, a 90% cache discount. Agent workflows resend stable context each turn, so much of the traffic hits the cache lane. That lands well below Anthropic's flagship pricing on cache-heavy loops. Note that search calls add a small per-call fee, and Kimi K3's verbose max-effort reasoning can raise output-token volume.

What is Kimi K3, briefly?

Kimi K3 is Moonshot AI's 2.8-trillion-parameter open-weight Mixture-of-Experts model, released July 16, 2026, with full weights due July 27 under a permissive license. It activates roughly 16 of 896 experts per token, has a 1-million-token context window, native vision, and reasoning on by default. It debuted at #1 on Arena.ai's Frontend Code Arena with 1,679 points, ahead of Claude Fable 5 and GPT-5.6 Sol, and scores in the top tier of the Artificial Analysis Intelligence Index.

Does this work in Codex, Cursor, or OpenClaw too?

The Pexo skill does. Because Agent Skills is an open standard, the same Pexo skill runs in Claude Code, OpenAI Codex, Cursor, and OpenClaw, and the describe-generate-export workflow is identical. Running Kimi K3 as the backend is specific to how each agent configures its model endpoint. In Claude Code you use the Anthropic-compatible variables above; other agents point at Moonshot's OpenAI-compatible endpoint (https://api.moonshot.ai/v1, model id kimi-k3) instead.

How long does it take to make a video this way?

A 15-second, three-shot video with auto model selection and a mixed three-layer soundtrack takes about 8–10 minutes end to end, the same whether Kimi K3, Fable 5, or another model is the backend, because Pexo does the rendering. A single raw clip from one model returns faster (1–3 minutes) but is unassembled. Kimi K3's max-effort reasoning can add a little latency to the planning and status-reporting around the render, but not to the render itself.

How much does it cost to make videos with Claude Code and Kimi K3?

Two meters run. The reasoning side is Kimi K3's API usage at $3/$15 per million tokens ($0.30 cached), which is small for a few video requests. The video side runs on Pexo credits; new Pexo accounts include a starting allowance to try it, and cost scales with how much video you generate. Your Claude Code subscription is separate. In practice the Pexo generation cost, not the Kimi K3 token cost, is the larger line item for regular video production.

Pexo Recommend