Use DeepSeek with Claude Code
$0.3/Mtok inThe cheapest way to run long agent sessions: DeepSeek's commodity token prices under Claude Code's agent loop, with its prompt cache making each repeated turn cost a fraction of a cent. Ideal for bulk refactors and test generation where volume dwarfs per-token quality differences.
Facts
At a glance
Model
DeepSeek V4.1 Flash
deepseek/deepseek-v4-1-flash
Price
$0.3 / M input · $1.2 / M output · $0.006 / M cached input
Context window
1,000k tokens
Tool
Claude Code
Setup below, under two minutes
Quickstart
Set up DeepSeek in Claude Code
- 1
Point Claude Code at CompanyFabric with your CompanyFabric key (sk-cf-…), no Anthropic account needed:
export ANTHROPIC_BASE_URL="https://api.companyfabric.com" export ANTHROPIC_API_KEY="sk-cf-…" - 2
Start a session on this model, and answer yes when Claude Code asks to use the API key:
claude --model deepseek/deepseek-v4-1-flash - 3
Tool calls work as usual: Claude Code reads files, edits and runs commands. Every turn's exact cost lands in your dashboard usage feed; set a per-key budget cap if the agent runs unattended.
Full tool guide: Use any model with Claude Code →
FAQ
Frequently asked questions
Do I need a DeepSeek account to use DeepSeek in Claude Code?
No, one CompanyFabric key covers DeepSeek V4.1 Flash and every other model in the library. Billing is one prepaid balance with exact per-call metering; BYOK at 0% is available if you already have provider keys.
What does DeepSeek V4.1 Flash cost in Claude Code?
$0.3 / M input · $1.2 / M output · $0.006 / M cached input, the same metered price as any other route to the model. Set a per-key budget cap to bound what the tool can spend.
Can I switch models later without touching Claude Code again?
Yes, the endpoint stays the same; the model is a string. Any catalog id works in the same configuration, including cheaper tiers for bulk work.
Explore
Related setups
Use Gemini with Claude Code
Claude Code's agent loop with Gemini's million-token context: point the harness at a model that can hold your whole repo in one window. CompanyFabric translates Claude Code's requests for Gemini, tool calls included, so it is a --model flag, not a different tool.
Use Kimi with Claude Code
Kimi K3's tool-calling is tuned for agentic work, which makes it the strongest open-weights brain for Claude Code sessions, at a fraction of frontier pricing.
Use GPT-5.5 with Claude Code
Run OpenAI's flagship inside Claude Code for a second opinion on hard problems, same tools, different reasoning style. Useful as a review pass over changes drafted by another model.
Use DeepSeek with Cursor
Give every developer frontier-adjacent completions at commodity prices, DeepSeek in Cursor is the budget default that still holds up on real diffs.
One key. Every model. Exact prices.
Run DeepSeek in Claude Code with free starter credits. Free starter credits included, no subscription required.