Anwar Bouilouta

Race DeepSeek V4.1 Flash Against Claude Opus 5.5 on Your Own Code

The exact prompt, settings and six tests I used to race the two models on one real job, so you can run the same race before you switch.

A free guide by Anwar Bouilouta 4 min read

Back to all free guides

So in the reel I put DeepSeek's new V4.1 Flash up against Claude Opus 5.5 on one real job from my own code. Both passed all 6 tests. Opus cost about 20 cents and Flash cost about 1 cent. Here's the whole kit, so you can run the same race on your own code before you switch anything.

What I found

  • The job. Two new flags, --dry and --check, on slots.mjs, the script that lays out my reel schedule. Six tests decide pass or fail.
  • Opus 5.5: all 6 tests, 37 seconds, about $0.20.
  • Flash: all 6 tests, 32 seconds, about 1 cent ($0.0108 at DeepSeek's peak prices).
  • The claim that started it. DeepSeek's own model card gives Flash 77.0 on DeepSWE, a coding benchmark, against 74.0 for Opus 5. That's Opus 5, not 5.5, which is why I ran my own test.

Before you start

  • Claude Code, installed and working.
  • A DeepSeek API key from platform.deepseek.com/api_keys. Top up a couple of dollars, since my whole Flash run cost about a cent.

Step 1: Write the job prompt

Pick one small, real file of yours and two features you actually need added to it. Ask for the whole file back in one code block and tell it not to edit anything, so you can test the answer yourself. This is the exact prompt I used:

My prompt
slots.mjs lays out the reel schedule from plan.json into slots.json. Add two flags to it:
--dry: work out the slots and print the summary, but don't write slots.json.
--check: don't write anything. If slots.json already matches exactly what plan.json would produce, print "slots.json is up to date" and exit 0. Otherwise print "slots.json is out of date" and exit 1.
Running it with no flags must behave exactly as it does now. Don't edit any files. Reply with the complete new slots.mjs in a single js code block.

Here's the same thing ready for your file. Fill in the last three lines and save it as prompt.txt in the file's folder:

Your prompt
Add the two features below to the file below. Running it without them must behave exactly as it does now. Don't edit any files. Reply with the complete new file in a single code block.

File:
Feature 1:
Feature 2:

Step 2: Run Opus 5.5

From that folder, in your terminal:

The Opus 5.5 run
claude -p "$(cat prompt.txt)" --model claude-opus-5-5 --output-format json --disallowedTools Edit Write NotebookEdit Bash Agent > opus.json

The flags keep it to a reply only, with no file edits and no commands, so both models get exactly the same job.

Step 3: Point Claude Code at Flash

Open a second terminal, so your normal Claude Code stays on Claude. These are the settings from DeepSeek's own Claude Code guide, then the same command:

The Flash run
export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN=paste-your-deepseek-key-here
export ANTHROPIC_MODEL=deepseek-flash
claude -p "$(cat prompt.txt)" --model deepseek-flash --output-format json --disallowedTools Edit Write NotebookEdit Bash Agent > flash.json

Always name the model. DeepSeek sends any model name starting with claude-opus to its V4 Pro model, not to Flash.

Step 4: Score both the same way

Write your tests before you look at either answer. These were my six:

  1. --check on an up-to-date file exits 0 and says up to date.
  2. --dry after a plan change prints the new summary and leaves slots.json alone.
  3. --check after a plan change exits 1, says out of date and writes nothing.
  4. No flags rewrites slots.json after the plan change.
  5. --check after the rewrite exits 0 again.
  6. No flags on the original plan writes the same slots.json as before.

Run your original, unchanged file through the same tests too. Mine scored 2 of 6, which proves the tests can actually tell the difference.

Step 5: Work out what each run cost

Both JSON files show the time (duration_ms) and the token counts. Claude Code's own cost line assumes Claude's prices, so it's right for Opus and wrong for Flash. For Flash, use DeepSeek's prices per million tokens:

  • Flash at peak hours (01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday): $0.3 input, $1.2 output and $0.006 for cached input. Off-peak is half of that.
  • Opus 5.5, for comparison: $4 input and $20 output.

My Flash run used 13,457 fresh input tokens, 48,128 cached and 5,407 output, which comes to $0.0108 at peak. Do the same sum for yours, and you'll know what switching would really save on your own code.

Community now open

My AI Growth Room on Skool is free to join, and the Claude editing skill I use for my reels is in there.

Join free

Where to next

Three ways to get it done

Do it yourself

Free

Every guide points you at one AI tool that's worth your time, with the prompt or checklist to set it up yourself.

See all free guides

Done with you

Community now open

Go from watching AI videos to using AI in your own work every week, with live help and a group doing it alongside you.

Join free

Done for you

With ABAI

For owners of B2B businesses with a bottleneck that's costing them clients. We find it, then build the AI growth system that fixes it, in your own tools and on a fixed fee.

Book a strategy call