Musk Followed DeepSeek, but Here's How to Use It from Scratch
I compared Doubao and DeepSeek by actually running the API. Today, Musk followed DeepSeek's X account, which is an interesting piece of news. But seriously, for most people, you don't need to understand why Musk follows it; you just need to know how to use it.
I previously wrote an analysis on DeepSeek's IPO push, thinking it faced valuation pressure. Now that the V4-Flash official API beta is out, I spent two hours over the weekend going from zero registration to making my first call, documenting all the pitfalls I encountered.
Step 1: Register an Account, Don't Be Scared by the Word "API"
The most common mistake beginners make: assuming APIs are only for programmers and closing the page immediately.
Reality: You just need an email address. It's as simple as registering for Taobao.
1. Go to the DeepSeek official website and find the Register button in the top right corner.
2. Enter your email address and receive a verification code (Note: QQ Mail might get blocked; I waited 5 minutes without receiving it, then switched to Gmail and got it instantly).
3. Set a password, requiring at least 8 characters including uppercase, lowercase letters, and numbers.
4. After logging in, you'll see the console interface. Don't panic. Look for API Keys in the left menu bar and click it.
Pitfall Log: When I first registered, phone number verification failed because DeepSeek only supports numbers from certain countries. If you're using a mainland China mobile number, select +86, but I recommend using email registration for better stability.
Step 2: Get Your API Key, This Is Your "Key"
An API key is a string that acts as your identity credential. Every time you call the model, the system uses it to know it's you, not someone else.
1. Click API Keys on the left side of the console.
2. Click Create New Key, give it a name (e.g., "Test Use"), and confirm.
3. A string will pop up, looking like this: sk-xxxxxxxxxxxxxxxxxxxxxxxx
4. Copy and save it immediately. This popup appears only once. Once closed, you can never see it again.
If you didn't save it: You have to delete the old key and create a new one. I made this mistake; I forgot the key while coding and had to go back and recreate it.
Step 3: Top Up, But Don't Add Too Much
During the DeepSeek-V4-Flash public beta, prices are very cheap, roughly 0.5 yuan per million tokens. (What is a token? Simply put, one Chinese character is about 2 tokens, so 1 million tokens is roughly 500,000 characters of text.)
1. Find the Top Up entry in the console, usually in the top right corner.
2. The minimum top-up amount is 10 yuan. I suggest starting with 10 yuan, which is enough for hundreds of test calls.
3. Payment methods include WeChat Pay and Alipay, just like online shopping.
To clarify: There is a free quota during the beta period, seemingly 5,000 tokens per person per day. But once the free quota is used up, it's gone. Topping up 10 yuan lets you test with peace of mind.
Step 4: Configure the Environment, The Most Headache-Inducing Step for Beginners
This step is the trickiest, but I'll try to explain it clearly.
Scenario 1: You just want to test online, no coding required
1. Return to the DeepSeek homepage and find the Online Experience button.
2. Type your question, e.g., "Write a poem about AI," and you'll see the response.
3. This online version uses the V4-Flash model, offering good speed and quality.
Scenario 2: You want to call the API in your own program or tool
This requires installing Python (a programming language, similar to a "translator" on your computer that reads your instructions and executes them).
1. Download the installer from the Python official website; choose the latest version.
2. During installation, remember to check "Add Python to PATH" (this option is unchecked by default, and beginners often miss it).
3. Open Command Prompt (Windows: Press Win+R, type cmd).
4. Type pip install openai and press Enter (pip is Python's package manager, like an app store for phones).
Pitfall Log: Many people get stuck here because pip throws an error saying "pip is not recognized as an internal command." This is because you didn't check "Add Python to PATH." Solution: Uninstall Python, reinstall it, and check that box.
Step 5: Write Your First Code Snippet, Let AI Speak
Copy the code below, paste it into a text file, and save it as test.py (Note: The extension must be .py, not .txt).
client = OpenAI(
api_key="Your_API_Key", # Replace with the key you copied earlier
base_url="https://api.deepseek.com" # This is DeepSeek's address, don't write it wrong
)
response = client.chat.completions.create(
model="deepseek-chat",
messages=[
{"role": "user", "content": "Hello, I'm a beginner. Teach me how to use DeepSeek"}
]
)
Explanation: from openai import OpenAI imports the library, client = OpenAI(...) tells the system where to find DeepSeek and which key to use. response = ... sends the request, and print(...) outputs the result.
1. Replace api_key in the code with your actual key.
2. Save the file, e.g., as test.py.
3. Open Command Prompt, type python test.py, and press Enter.
4. Wait a few seconds, and you'll see the AI's answer.
If your code errors out: It's likely a typo in the key or a network issue. Check the key format to ensure there are no extra spaces. If the network fails, try using a mobile hotspot.
Step 6: Verify Effectiveness, See if It Works
Once it runs, you can change the questions in the code, such as:
- "Help me write a 100-word self-introduction"
- "Explain what machine learning is in simple terms"
- "Write a rhyming poem about summer"
Each time you change the text in content, save the file, and rerun python test.py.
Effect Comparison: I tested Doubao and DeepSeek. I feel DeepSeek-V4-Flash is more accurate in understanding Chinese and provides more structured answers. However, if you ask it "Who won the 2026 World Cup?", it might say "My knowledge cutoff is 2025." This is normal, as the model hasn't been updated with the latest data.
Pitfall Summary: Three Most Common Issues
Pitfall 1: Key Leakage. If you share your code with others or upload it to GitHub, your key might be abused. Secure Practice: Store keys in environment variables; do not hardcode them in the script.
Pitfall 2: Network Timeout. If you're on a corporate or school network, firewalls might block connections. Solution: Use a mobile hotspot or set up a proxy.
Pitfall 3: Wrong Model Name. DeepSeek's model name is deepseek-chat, not deepseek-v4. I initially wrote it wrong, got a "model does not exist" error, and spent ages figuring it out.
What to Try Next After Learning This
You don't need to become a programmer immediately. Try these directions:
1. Use DeepSeek to write weekly reports: Dump your week's work content into it and tell it "Format this as a weekly report." Done in three seconds.
2. Use DeepSeek to analyze data: Copy Excel data into it, let it find patterns and draw charts.
3. Use DeepSeek for translation: More accurate than Google Translate, especially for technical terminology.
I plan to try integrating DeepSeek with iMessage next to auto-reply to messages. But that's more complex; I'll write a tutorial once I get it working.
Have you ever thought about what we should do first if everyone around us could use AI?
Physix Frontier