DeepSeek V4 Pricing Overview

The DeepSeek V4 series is currently the most cost-effective top-tier model on the market:

deepseek-v4-flashdeepseek-v4-pro
Input (cache hit)¥0.02/M tokens¥0.025/M tokens
Input (cache miss)¥1/M tokens¥3/M tokens
Output¥2/M tokens¥6/M tokens
Context1M tokens
Max Output384K tokens

Compared to GPT-5 (input $5/output $20 per million tokens), DeepSeek V4 Flash costs only 1/25 of GPT-5.

Cache Mechanism Details

DeepSeek's context caching works automatically without manual configuration:

  • It automatically hits when the system prompt + history messages in an API request repeat previous requests
  • On hit, input price drops from ¥1 to ¥0.02 (98% savings)
  • Cache retention is about 5-10 minutes, suitable for high-frequency conversation scenarios

Strategies to Maximize Cache Hits

# Strategy 1: Fixed System Prompt - all requests share the same system prompt
# Strategy 2: Batch Processing - multiple questions share the system prompt
# Strategy 3: In long conversations, earlier messages are automatically cached

Flash vs Pro Selection Guide

ScenarioRecommended ModelReason
Daily conversation, customer serviceFlashLow cost, sufficient quality
Code generation, complex reasoningProMore accurate in coding and reasoning
High concurrency, large-scale deploymentFlash2500 concurrent vs 500 concurrent
Budget sensitiveFlashPrice is only 1/3 of Pro
Need highest qualityProHigher accuracy on complex tasks

Token Optimization Tips

  • Simplify System Prompt: Remove unnecessary descriptions, keep core instructions
  • Limit Output Length: Use max_tokens parameter to control
  • Clean Up History Messages: Keep only the last N turns, summarize the rest
  • Monitor Usage: Regularly check token consumption reports on the DeepSeek platform

Cost Estimation

For example, with 1000 token input + 500 token output: cache miss ~¥0.002; cache hit ~¥0.00102. With 10,000 calls per day, each with 3000 tokens output, about ¥60/day (Flash with cache hit).