671B total, 37B active, $0.001/1k tokens. Yes really.
Spoiler: it's faster, it's cheaper, and the weights are on HuggingFace. DeepSeek V4 dropped overnight and the frontier-vs-open-source gap just became a rounding error.
The Setup
V4 is a 671B-parameter mixture of experts with 37B active per token. It beats GPT-5 on HumanEval and MATH, ties on MMLU Pro, and the API is basically free. The weights are open. Read that sentence again.
{`curl https://api.deepseek.com/chat/completions \\
-H "Authorization: Bearer $DEEPSEEK_API_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"model": "deepseek-v4",
"messages": [{"role": "user", "content": "ship me a working zod schema for a stripe webhook"}]
}'`}The Money Pattern
The SDK is OpenAI-compatible, so the migration is one line. I swapped it into a Pipedrive enrichment script for Rebuild Relief and the bill dropped from $40/day to about $1.20.
{`from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEEPSEEK_API_KEY"],
base_url="https://api.deepseek.com",
)
resp = client.chat.completions.create(
model="deepseek-v4",
messages=[
{"role": "system", "content": "Extract structured claim data as JSON."},
{"role": "user", "content": claim_text},
],
response_format={"type": "json_object"},
)`}The Catch
Still censored on a predictable list of topics — Tiananmen, Taiwan, the usual. For business workflows nobody cares. For chatbots that might field political questions, you'll want a filter layer or just self-host the weights and run an uncensored fine-tune.
The Verdict
If you're still paying frontier-lab prices for synthesis or extraction tasks, you're lighting money on fire. DeepSeek V4 is the new default model in our Supabase Edge Functions. GPT-5 is for the brand-name boardroom slide. V4 is for the prod environment.