Use DeepSeek V4 (Flash & Pro) from the command line — one-shot Q&A, thinking mode, multi-turn chat. OpenAI-compatible API, no special CLI needed. Supports de...
Use DeepSeek V4 Flash and Pro directly from your terminal — one-shot questions, deep reasoning with thinking mode, and multi-turn chat. No special CLI required; uses the OpenAI-compatible API via a small Python script.
1. Get API key: https://platform.deepseek.com/api_keys
2. Set environment variable:
bash
export DEEPSEEK_API_KEY=your_key_here
# Add to ~/.zshrc or ~/.bashrc to persist
ModelIDBest forPrice (input/output)V4 Flash ⚡deepseek-v4-flashQ&A, writing, coding, summaries$0.014 / $0.028 per 1MV4 Pro 🚀deepseek-v4-proHard reasoning, math, deep analysis$0.174 / $0.348 per 1M
Both support 1M token context. Cache hits are 10× cheaper.
Legacy aliases ( deepseek-chat → flash, deepseek-reasoner → pro) deprecated 2026-07-24.
bash
uv run {baseDir}/scripts/ask.py "Explain the difference between V4 Flash and V4 Pro"
bash
uv run {baseDir}/scripts/ask.py "Write a merge sort in Rust" --model pro
bash
uv run {baseDir}/scripts/ask.py "Prove that there are infinitely many primes" --think
bash
uv run {baseDir}/scripts/chat.py --model flash
uv run {baseDir}/scripts/chat.py --model pro --think
bash
uv run {baseDir}/scripts/models.py
Use Flash when:
Use Pro when:
--think) streams the internal reasoning before the final answer — useful for hard problems and to verify correctness--system "You are a concise assistant" to set tone--no-stream for cleaner output in scriptsbase_url="https://api.deepseek.com/v1"