DeepSeekReasoningR1
DeepSeek API Integration Guide
Integration methods, reasoning scenarios, and troubleshooting for DeepSeek R1 and DeepSeek V3.
Use Cases
DeepSeek R1 is suitable for reasoning, math, code analysis, and complex planning; DeepSeek V3 is better for general conversation, content generation, and routine tool calling.
Model Selection
Choose deepseek-r1 when stronger reasoning is needed, choose deepseek-v3 for low-latency general capabilities.
- Complex problem decomposition
- Code review
- Multi-step reasoning
- Chinese knowledge Q&A
Request Example
ChinaWHAPI maintains a unified request format, making it easy to switch between different models.
curl https://chinawhapi.com/v1/chat/completions \
-H "Authorization: Bearer {key}" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-r1","messages":[{"role":"user","content":"Explain the difference between RAG and fine-tuning"}]}'Troubleshooting
Common DeepSeek errors include 401 (invalid key), 429 (rate limit), and 500 (upstream service exception).
- For 429, add retry logic with backoff
- For 500, wait and retry; usually a temporary upstream issue