Home/Blog/AI Tools

Claude Code on DeepSeek: A 27-Cent Video, the Setup and the Risks

A developer says his 22-second motion graphics film cost 27 cents with Claude Code on DeepSeek. How it works, what it costs against Claude, the setup and what to keep away from it.

Allen Anant Thomas

Allen Anant Thomas

November 1, 2026

12 min read
AI Tools
Claude Code on DeepSeek: A 27-Cent Video, the Setup and the Risks

A 22-second motion graphics film with animated type, a drawn whale, particles and a bar chart counting up. Its maker, the developer Huashu, says it cost him 1.95 yuan, roughly 27 US cents. He made it with Claude Code, but Claude Code was not running on Claude. It was running on DeepSeek V4.1 Flash.

That works because Claude Code is the app and the model is a setting. DeepSeek runs an address that speaks the same language as Anthropic's API, so you can point Claude Code at it and pay DeepSeek's prices instead.

This guide covers how the switch works, what it really costs next to Claude, the full setup step by step, the free skill behind the film's look, how to switch back, and the files and jobs you should keep away from it.

Short answer: you can point Claude Code at DeepSeek's API and pay DeepSeek's prices, which are a small fraction of Claude Opus and Sonnet. It works well for public creative work like motion graphics. Keep client files, customer data and agents with real-world access away from it.

  • DeepSeek publishes an official guide for Claude Code. You set a few environment variables and Claude Code sends its requests to DeepSeek instead of Anthropic.
  • DeepSeek V4.1 Flash costs $0.15 to $0.30 per million input tokens and $0.60 to $1.20 per million output tokens. Cached input costs $0.003 to $0.006.
  • The look comes from huashu-motion, a free MIT-licensed skill that makes Claude Code write launch films as web pages.
  • Anthropic says it does not support routing Claude Code to non-Claude models.
  • DeepSeek's privacy policy says it stores personal data in the People's Republic of China.
Prefer video? Watch the short version, or open it on Instagram or YouTube.

What "Claude Code on DeepSeek" means

Claude Code is the app. It reads your files, writes new ones, runs commands and keeps track of the job. The model is the brain it sends each step to. Normally that brain is Claude.

DeepSeek runs an endpoint that speaks the same format as Anthropic's API, at https://api.deepseek.com/anthropic. Set Claude Code's base URL to that address, give it a DeepSeek API key, and every request goes to DeepSeek. You keep the same Claude Code screens, skills and commands, with a cheaper model doing the thinking.

DeepSeek's guide maps Claude Code's model names to its own. Anything Claude Code calls Sonnet or Haiku goes to DeepSeek V4.1 Flash. Anything it calls Opus goes to DeepSeek V4 Pro, billed at the V4 Pro price. The guide's settings also point the Opus slot at Flash, so in practice almost everything runs on Flash.

How the 27-cent film was made

Huashu, who posts on GitHub as alchaincyf, made the film to show that his huashu-motion skill does not depend on Claude Opus. His project's README lays out what he did:

  • He asked for a film under 30 seconds with as many fast cuts and kinds of motion as possible, ending on a note that DeepSeek V4.1 Flash made it.
  • While it worked, he asked for the DeepSeek whale logo at the opening.
  • He gave two more rounds of notes on drafts, cutting effects he did not like and asking for the big moment to come earlier.
  • The eighth version was the one he kept. With music and sound effects it took under half an hour.
  • The bill was 1.95 yuan, with a 99.4% cache hit rate.

That cache figure is most of the story. When the same instructions and files are sent again and again, DeepSeek bills the repeated part at its cache price, which is about 2% of its normal input price.

The other part is the skill. Huashu writes that the single color palette, the dot carried through the film and the music locked to 124 beats per minute all came from huashu-motion, and that he never asked for them. His point is that the method in the skill, not the price of the model, carries the look. He also notes that results depend on the model, and that taste differs between models even when both do well.

Why it is so cheap: DeepSeek vs Claude prices

ModelInput, per 1M tokensCached input, per 1MOutput, per 1M tokens
DeepSeek V4.1 Flash$0.15 off-peak, $0.30 peak$0.003 off-peak, $0.006 peak$0.60 off-peak, $1.20 peak
DeepSeek V4 Pro$0.66 off-peak, $1.32 peak$0.022 off-peak, $0.044 peak$1.98 off-peak, $3.96 peak
Claude Haiku 5.5 (prompts up to 100K tokens)$0.10$0.01$0.50
Claude Sonnet 5.5$2$0.10$10
Claude Opus 5.5$4$0.20$20

DeepSeek's peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays, not counting Chinese public holidays. That is evening and the small hours in the US, so a US team working office hours pays the off-peak rate.

To make the table concrete, take an illustrative job: 2 million input tokens, 95% of them served from cache, plus 100,000 output tokens. That is arithmetic on the list prices above, not a measured bill, and it ignores Anthropic's extra charge for writing to the cache.

ModelCost of the example job
DeepSeek V4.1 Flash, off-peakAbout 8 cents
DeepSeek V4.1 Flash, peakAbout 16 cents
Claude Haiku 5.5About 8 cents
Claude Sonnet 5.5About $1.39
Claude Opus 5.5About $2.78

The surprise in that table is Haiku. If cost is the only reason you want to switch, Claude's own smallest model is in the same range as Flash on cached work. The catch is that Haiku's low price applies to prompts up to 100,000 tokens, and long Claude Code sessions can go past that.

Three more things the tables do not show. Claude Code itself is included in paid Claude plans from $17 a month billed yearly, and those plans have usage limits rather than per-token bills. DeepSeek is prepaid: fees come out of the balance you top up. And web searches Claude Code makes through DeepSeek are billed separately, at $0.75 per 1,000 search requests.

Before you start

  • Claude Code in the terminal. DeepSeek's guide is written for the terminal version. Install it with curl -fsSL https://claude.ai/install.sh | bash on a Mac or Linux, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell. DeepSeek's guide lists Node.js 18 or newer, plus Git for Windows on Windows.
  • A DeepSeek Platform account at platform.deepseek.com, with a few dollars of credit.
  • For the motion skill: Node 22 or newer, Google Chrome, Chromium or Edge, and FFmpeg. The skill's creator has tested it on macOS only so far.
  • An empty folder for the project, with nothing private in it. This matters more than any other item on the list, and the safety section below explains why.

Step 1: Create a DeepSeek API key

  1. Sign up at platform.deepseek.com and add a few dollars. Because the account is prepaid, the amount you top up is also the most you can spend, which makes a small first top-up a sensible limit.
  2. Open API Keys, create a new key and give it a name you will recognize, such as "claude-code".
  3. Copy the key and keep it somewhere safe for the next step. Treat it like a password: anyone with it can spend your balance.

Step 2: Decide where the setting lives

Claude Code reads settings from more than one file, and the file you pick decides which projects run on DeepSeek. This is the decision people skip and regret.

FileApplies toPick it when
~/.claude/settings.json (user settings)You, in every project on this computerThis computer is only for side projects and public work
.claude/settings.local.json inside one project folderYou, in that one project onlyYou also use Claude Code for client work or anything private

On Windows, ~/.claude means the .claude folder inside your user folder. Claude Code keeps the project-local file out of git when it creates it, so your key does not end up in a shared repository.

Step 3: Paste the setup prompt

  1. Open a terminal in your empty project folder and type claude to start Claude Code.
  2. Paste the prompt below, with your key in place of PASTE-KEY. This version saves the setup in your user settings, so every project on the computer switches.
  3. If you picked the project-only file in Step 2, change "Save it in my user settings" to "Save it in this project's .claude/settings.local.json only".
  4. Claude Code reads DeepSeek's guide and then edits the settings file. Depending on your permission settings, it asks before it writes. Read the change before you approve it. It should add the variables shown further down and nothing else.
Set up Claude Code to use DeepSeek with this guide: https://api-docs.deepseek.com/quick_start/agent_integrations/claude_code. Save it in my user settings. My key is: PASTE-KEY

Prefer a one-click copy? The same steps and prompt are on our free prompt page.

What the setup prompt changes

If you want to see what Claude Code will set, these are the variables from DeepSeek's guide (Mac and Linux form; in Windows PowerShell each line uses $env:NAME="value" instead):

export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN=<your DeepSeek API Key>
export ANTHROPIC_MODEL=deepseek-flash[1m]
export ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek-flash[1m]
export ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek-flash[1m]
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-flash
export CLAUDE_CODE_SUBAGENT_MODEL=deepseek-flash
export CLAUDE_CODE_EFFORT_LEVEL=max
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=786432

In a settings file, the same variables go inside an env block, one line per variable. What each one does: the first line sends every request to DeepSeek, the second is your key, the model lines send every role to Flash, the effort line asks for the most thinking on each step, and the last line tells Claude Code when to compress a long conversation. Flash has a context window of 1 million tokens, which is what the [1m] in the model name refers to.

Settings files are strict JSON. A stray comma or a comment makes Claude Code show a Settings Error the next time it starts, with an offer to fix the file with Claude's help.

Step 4: Restart and check it worked

  1. Close Claude Code and open it again. Most settings reload on their own, but the model is read when a session starts, so a restart is the reliable way to switch.
  2. Type /status. Look for an Anthropic base URL line showing the DeepSeek address, and an Auth token line naming ANTHROPIC_AUTH_TOKEN. If you see a Login method line with your claude.ai account instead, the setting did not load.
  3. Close the status menu and send a short test message, such as "say hello in five words". A normal reply means the connection works.
  4. Check your DeepSeek balance. A tiny drop confirms the request went to DeepSeek and not to your Claude plan.

While the DeepSeek key is active, your claude.ai login stays saved but unused. A few features that depend on a claude.ai identity, such as Remote Control and voice dictation, are switched off until you switch back.

Step 5: Install huashu-motion and make a film

huashu-motion is a free skill for coding agents like Claude Code and Codex. A film is one web page, so every frame is code, and the skill brings the directing rules: a hook in the first three seconds, a burst in the middle, a beat of silence before the biggest hit.

  1. In your project folder, run the install line below, or ask Claude Code: "Install the huashu-motion skill (github.com/alchaincyf/huashu-motion) and run the demo".
  2. Ask Claude Code to run om doctor, the skill's own check. It lists anything missing, usually FFmpeg or the right Node version.
  3. Ask for your first film. Give it a product, a website address or a data file, and a length.
  4. Pick a direction. The skill reads your material and shows three directions as key frames before it builds anything.
  5. Review in the browser editor it opens. Press C, click the frame where something is off, and type the change. It edits only that spot, keeps every version, and undo works.
  6. Export. It writes MP4, GIF, transparent MOV, WebM or a page you can share. Films of four seconds or longer end with a small "Made with huashu-motion" credit for the last 1.2 seconds, which you can ask the agent to switch off.
npx skills add alchaincyf/huashu-motion

Requests that work well, adapted from the skill's own examples:

Make a 30-second launch film for my product. The site is [your link].

Turn sales.csv into a 30-second explainer on why repeat orders went up.

Make a vertical 1080x1920 version of this film for social.

Be specific in your notes, the way Huashu was: name the frame, say what to cut, say what should happen sooner. The skill cannot hear, so the agent checks music through the score and a spectrogram. The last listen is yours. It also does not generate people or live footage. Everything is drawn in code, and you bring your own footage if you want any.

Troubleshooting

  • A startup warning about two credential sources. Your DeepSeek key and your claude.ai login are both active. Run /logout to use only the key, or remove the key to go back to Claude.
  • 401 errors about an invalid token. The key is wrong, has a space at the end, or was deleted. Create a new one on the DeepSeek Platform and update the settings file.
  • 400 errors naming "Extra inputs are not permitted". Claude Code sent a newer feature DeepSeek's endpoint does not accept. Claude Code's docs suggest adding CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 to the same env block.
  • /status shows no base URL. The setting is in a file Claude Code did not load, or the JSON is broken. Ask Claude Code to show you the file and check it against the variables above.
  • 402 errors about insufficient balance. Your prepaid DeepSeek balance has run out. Top up on the DeepSeek Platform and try again.
  • 429 or 503 errors. DeepSeek is rate limiting you or is overloaded. Wait a moment and retry.
  • The film will not render. Run om doctor again and install whatever it lists, such as FFmpeg or a newer Node. Windows is untested, so a Mac is the easier route.

How to switch back to Claude

  1. Open the settings file you used in Step 2. You can ask Claude Code to do it: "remove the DeepSeek variables from my settings".
  2. Delete the DeepSeek lines from the env block: the base URL, the auth token, the model names, the effort level and the compact window.
  3. Close Claude Code and open it again.
  4. Run /status. The Anthropic base URL line should be gone and your claude.ai login should be back.

Gotchas before you switch

  • User settings apply everywhere. Once the setup is in ~/.claude/settings.json, every project you open in Claude Code on that computer runs on DeepSeek, client projects included. If you also use Claude Code for client work, use the project-local file from Step 2.
  • Anthropic does not support it. Claude Code's gateway docs say Anthropic "doesn't support routing Claude Code to non-Claude models through any gateway". If a Claude Code feature breaks on DeepSeek, Anthropic's support will not cover it.
  • Opus requests can cost more. Anything that reaches the V4 Pro mapping is billed at V4 Pro prices, roughly three to four times Flash.
  • Results differ by model. Huashu's own limits section says DeepSeek V4.1 Flash does well with his skill but that taste differs between models. Judge your first film on its own merits, not against a film made on Opus.
  • Windows is untested for the skill. Huashu has only tested huashu-motion on macOS so far.

Is it safe to use for business?

Plenty of business owners say they would never put a Chinese model anywhere near their business. The honest answer depends on what the model can see and what it can do.

It fits public, creative work with nothing private in it. A motion graphics film for a social post is made to be seen by everyone. If the folder holds only the brief and the film, there is very little to lose.

Keep it away from these:

  • Client files and customer data. DeepSeek's privacy policy says: "we directly collect, process and store your Personal Data in People's Republic of China." The same policy lists training and improving its models as a use of personal data, with an opt-out by email to privacy@deepseek.com, and says data is kept for as long as you have an account. Claude Code reads the files in the folder it works in, so anything in that folder can end up in a request.
  • Agents that can act for you. In NIST's September 2025 tests, agents built on DeepSeek R1-0528 were 12 times more likely than US frontier models to follow malicious instructions hidden in what they read. Those were older models, but we would not give a DeepSeek-powered Claude Code access to email, ad accounts or payment tools.
  • API keys and passwords. Keep secrets out of the folder you open.

For comparison, Anthropic says that by default it does not use inputs or outputs from its commercial products, including the API, to train its models.

Our working rule: a separate folder, project-level settings, public material only. If that is more care than a project is worth, Claude's own small model, Haiku 5.5, costs $0.10 per million input tokens on Anthropic's API and came out in the same range as Flash in the example above.

Frequently asked questions

Can Claude Code use DeepSeek instead of Claude?

Yes. DeepSeek publishes an official Claude Code guide: you set ANTHROPIC_BASE_URL to https://api.deepseek.com/anthropic, add your DeepSeek API key and set the model names, and Claude Code sends its requests to DeepSeek. Anthropic says it does not support routing Claude Code to non-Claude models.

How much does Claude Code on DeepSeek cost?

You pay DeepSeek per token. As of 27 October 2026, DeepSeek V4.1 Flash costs $0.15 to $0.30 per million input tokens, $0.003 to $0.006 for cached input and $0.60 to $1.20 per million output tokens, depending on peak hours. The developer Huashu says his 22-second film cost 1.95 yuan, roughly 27 US cents.

Is DeepSeek cheaper than Claude Haiku for Claude Code?

Often not by much. On an example job of 2 million input tokens with 95% cache hits and 100,000 output tokens, DeepSeek V4.1 Flash off-peak and Claude Haiku 5.5 both come to about 8 cents at list prices. Haiku's low rate applies to prompts up to 100,000 tokens, and Claude Sonnet and Opus cost far more.

Is it safe to use DeepSeek with Claude Code?

For public creative work with nothing private in the folder, the risk is low. Keep client files, customer data, API keys and agents with access to email or ad accounts away from it. DeepSeek's privacy policy says it stores personal data in the People's Republic of China.

How do I switch Claude Code back to Claude?

Remove the DeepSeek variables (ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, the model names, the effort level and the compact window) from the env block of the settings file you used, close and reopen Claude Code, then run /status to check the base URL line is gone and your claude.ai login is back.

Does huashu-motion work on Windows?

Its creator has only tested it on macOS so far. It needs Node 22 or newer, Chrome, Chromium or Edge, and FFmpeg, so Windows may need extra setup.

Sources

Keep Reading

Share

Ready to start scaling?

Tell us where growth is getting stuck. Allen will review your enquiry and reply within 24 hours. If there is a fit, we will arrange a free strategy call.