How to Use DeepSeek Models
Learn even with zero background. Four ways, from the simplest to the most professional, step-by-step guide to using DeepSeek models.
Start LearningFour Ways to Use, One Will Suit You
No technical background needed, no code reading required. From opening a webpage to local deployment, the four ways increase in difficulty, choose as needed.
Official App / Web Version (Recommended for Beginners)
The simplest way, no technical knowledge required, ready to use.
Step 1: Open DeepSeek
You can choose any of the following:
- Mobile: Search for DeepSeek in the app store (App Store / Huawei AppGallery / Xiaomi GetApps) and download the official app. The icon is a blue whale.
- Desktop: Open chat.deepseek.com in your browser, no download needed, use directly.
Step 2: Register and Log In
Supports phone number registration, also quick login with WeChat or Google account. Registration is completely free, no credit card required.
Step 3: Start Chatting
After logging in, you will see an input box at the bottom. Just like chatting with a WeChat friend, type your question and hit send. DeepSeek will reply within seconds.
Try these questions:
- "Help me write a weekly report, this week I completed the requirements document and API integration for Project A"
- "Explain in simple terms what machine learning is"
- "Recommend 3 AI introductory books suitable for beginners"
- "Help me translate this Chinese into English"
Advanced Features
- Upload Files: Click the attachment icon on the left side of the input box to upload PDF, Word, Excel, images, etc., and let DeepSeek analyze the content.
- Web Search: Turn on the "Web Search" toggle above the input box, and DeepSeek will search the internet in real time for the latest information.
- Voice Input: The app supports voice input, just speak to ask questions, very convenient.
DeepSeek Official App Advanced Usage Tutorial
Not just chat. The DeepSeek official app and web version have many powerful features, introduced one by one below, to help you truly make the most of DeepSeek.
Web Search Feature
DeepSeek supports real-time web search, allowing you to get the latest information, breaking through the time limitations of training data.
How to enable:
- Web version: Above the input box, click the "Web Search" toggle button (icon is a globe), and after enabling, the button will be highlighted
- App: Find the "Web Search" toggle above the chat input box and tap to enable
- After enabling, DeepSeek will automatically search the internet for the latest information for each of your questions
- Suitable for querying real-time news, latest policies, weather, stock quotes, etc.
Usage Tips
By default, it is recommended to keep web search off, and only turn it on when you need the latest information. When off, DeepSeek uses training data to answer, which is faster. Web search consumes more time but can retrieve real-time information.
Supported File Formats for Upload
DeepSeek supports uploading files in various formats, allowing AI to analyze document content. Click the attachment icon on the left side of the input box to upload.
Supported file formats:
PDF, Word (.docx), PPT (.pptx), Excel (.xlsx), TXT plain text
JPG, PNG, GIF, WebP (reads text from images, not multimodal recognition)
Python, JS, Java, C++, Go, and all other plain text code files
Long Text Processing (1 Million Token Context)
The DeepSeek official app supports up to 1 million tokens of long context, capable of processing text equivalent to the volume of the Three-Body Trilogy in one go.
What can 1 million tokens do?
- Upload and analyze the entire content of a full-length novel at once
- Process a complete project codebase for global code review
- Analyze full contract documents and legal files
- Read and summarize hours of meeting minutes
Note
The DeepSeek model locally deployed with Ollama has a default context of 128K tokens. To get a larger context, you need to run ollama run deepseek-r1:8b and then set /set parameter num_ctx 131072 to adjust. The official app and web version automatically support a 1 million token context.
Code Interpreter
The DeepSeek official app has a built-in code interpreter that can run Python code, analyze data, and generate charts. This is one of DeepSeek's most powerful features.
What the code interpreter can do:
- Data analysis: Upload Excel/CSV files and let DeepSeek run Python code to analyze data and generate charts
- Code execution: Write code directly in the conversation and run it to see the output
- Mathematical calculations: Perform complex mathematical operations, formula derivation, and data visualization
- File processing: Batch process files, format conversion, data cleaning
The code interpreter is automatically activated in the conversation — when you request a task that requires code execution, DeepSeek will automatically invoke the code interpreter to execute it. You don't need to enable it manually; it will automatically determine whether code needs to be run.
Voice Input Feature (App)
On the mobile app, you can ask questions directly via voice input without typing, which is ideal for scenarios like driving, cooking, or exercising.
How to use voice input:
- Open the DeepSeek App and find the microphone icon on the right side of the input box
- Tap the microphone icon and start speaking (DeepSeek automatically recognizes multiple languages including Chinese and English)
- After speaking, tap stop and the voice will be automatically converted to text and filled into the input box
- After confirming it's correct, tap send
Voice recognition accuracy is very high and supports mixed Chinese-English input. If you frequently use DeepSeek on your phone, voice input can significantly improve efficiency.
For more DeepSeek usage tips, please see DeepSeek Download and Installation Guide and DeepSeek Model Details.
DeepSeek API Quick Start
DeepSeek provides official API services, compatible with OpenAI SDK, extremely low prices, and almost zero migration cost. From registration to calling, it takes only 5 minutes.
Step 1: Get API Key
Open platform.deepseek.com, register or log in to your DeepSeek account. Go to the "API Keys" page, click "Create API Key", copy the generated key and store it securely (the key is only shown once).
Security Tip
The API Key is equivalent to your account password. Do not hardcode it in public code; it is recommended to store it in environment variables. Each API Key can have an expiration date and usage quota limits.
API Pricing (Extremely Cost-Effective)
DeepSeek API is billed per token, with prices far lower than similar products. The following are the official prices as of July 2026:
¥1
per million input tokens
¥2
per million output tokens
¥4
per million input tokens
¥16
per million output tokens
For comparison: ChatGPT API is about $15/million tokens (approx. ¥108), and DeepSeek V3 is only 1/50 of that. Although the R1 model has a slightly higher output price, it has built-in chain-of-thought reasoning, suitable for complex tasks.
OpenAI SDK Compatibility — Zero-Cost Migration
The DeepSeek API is fully compatible with the OpenAI SDK format. You only need to modify two lines of code: base_url and api_key. If you previously used OpenAI, migration takes only 30 seconds.
Python Call Example
After installing the openai package, set base_url to point to DeepSeek:
JavaScript / Node.js Call Example
Using the same pattern, in Node.js you only need to modify baseURL and apiKey:
curl Command Line Call Example
No SDK required, you can directly call the DeepSeek API with curl:
Streaming Output Example
Streaming output allows the AI to display text word by word like typing, providing a smoother experience. Simply set stream=True:
Model Selection Recommendations
- deepseek-chat (V3): Best for daily conversations, content writing, translation, code generation, with the highest cost-effectiveness
- deepseek-reasoner (R1): For mathematical reasoning, logical analysis, complex programming problems; it shows its thinking process before answering
For the complete API documentation, please visit platform.deepseek.com/api-docs. For more deployment options, see DeepSeek Local Deployment Tutorial.
Run Locally with Ollama (Data Stays on Your Device)
If you care about privacy or want to work offline, you can use Ollama to download the DeepSeek model to your own computer.
Step 1: Install Ollama
Go to ollama.com/download and download the installer for your operating system. Windows users download the .exe file and double-click to install. Mac users download the .dmg file.
Step 2: Download the DeepSeek Model
After installation, open your terminal (on Windows, press Win+R, type cmd, and press Enter; on Mac, open the "Terminal" app) and enter the following command:
ollama run deepseek-r1:8b
The first run will automatically download the model (about 5.2GB); the download speed depends on your network. Once downloaded, the terminal will display the chat interface directly, and you can start chatting with DeepSeek by typing your questions.
Beginner Tip
If your computer has limited specs, try the smaller 1.5B version: ollama run deepseek-r1:1.5b — it only needs 1.1GB and runs smoothly on a standard laptop.
Step 3: Exit the Chat
In the terminal, press Ctrl + D (also on Mac) to exit the chat. Next time, simply enter ollama run deepseek-r1:8b to continue; no need to re-download.
Ollama Integration with Development Tools
The official Ollama documentation recommends various development tool integrations. You can use the ollama launch command to start the DeepSeek model with various development tools in one go. Here are the officially supported integrations:
Claude Code
Anthropic's official AI coding tool, integrating the DeepSeek R1 model via Ollama for local code generation and editing.
Codex App
OpenAI Codex's desktop app, integrating DeepSeek R1 for powerful local code completion and generation.
OpenCode
An open-source AI coding tool, deeply integrated with DeepSeek R1, supporting code generation, refactoring, and debugging in the terminal.
OpenClaw
An AI Agent framework that, when integrated with DeepSeek R1 via Ollama, enables local automated task execution and workflow orchestration.
Hermes Agent
An AI Agent framework based on Nous Research's Hermes model, integrating DeepSeek R1 for intelligent conversation and task execution.
Codex CLI
OpenAI Codex's command-line version, integrating DeepSeek R1 via Ollama to use AI coding capabilities directly in the terminal.
The above commands require Ollama to be installed and the DeepSeek R1 model to be downloaded. For more local deployment options, see the DeepSeek Local Deployment Tutorial.
DeepSeek Model Customization (Modelfile)
Modelfile is Ollama's model configuration file. You can use it to create custom DeepSeek models—adjust parameters, set system prompts, or even combine multiple models. A Modelfile is a reusable model recipe.
What is a Modelfile?
Modelfile is similar to a Dockerfile; it is a plain text configuration file that defines the model's behavior and parameters. Through Modelfile, you can:
- Specify the base model (FROM)
- Set inference parameters (PARAMETER): temperature, top_p, top_k, etc.
- Define system prompts (SYSTEM) to make the model always play a specific role
- Adjust the context window size (num_ctx)
- Set custom templates (TEMPLATE)
Modelfile Practical Example: Programming Assistant
Create a file Modelfile (note the capital first letter, no extension) and write the following content:
Create and Run a Custom Model
In the directory where the Modelfile is located, run the following commands:
After successful creation, my-deepseek will appear as an independent model in your Ollama model list. You can use ollama list to view all created models.
Advanced Example: Multi-Scenario Custom Models
You can create multiple Modelfiles for different scenarios. Here are some practical templates:
Create and run:
Modelfile Usage Tips
- Lower temperature means more determinism: Translation/code 0.1-0.3, general conversation 0.7, creative writing 0.9-1.2
- The more specific the SYSTEM, the better: Clearly define the role, output format, tone style, and even provide examples
- Parameters can be overridden at runtime: In the conversation, enter
/set parameter temperature 0.5to temporarily adjust - View current parameters: In the Ollama conversation, enter
/show parameters
For more Ollama Modelfile documentation, please see Ollama Official Modelfile Documentation. For more model usage tips, please see DeepSeek Model Details.
API Call (Integrate into Your Project)
If you are a developer and want to integrate DeepSeek into your own application, you can do so via API calls. Ollama's local API is compatible with the OpenAI format, making migration extremely easy.
Prerequisites
Ensure Ollama is installed and the DeepSeek model is running (see Method 2). Once Ollama starts, it automatically exposes an API service at localhost:11434.
Python Call
# Install ollama package
pip install ollama
# Python call example
from ollama import chat
response = chat(
model='deepseek-r1:8b',
messages=[{'role': 'user', 'content': 'Hello, introduce yourself in one sentence'}]
)
print(response.message.content)
JavaScript / Node.js Call
// Install ollama package
// npm install ollama
import ollama from 'ollama'
const response = await ollama.chat({
model: 'deepseek-r1:8b',
messages: [{role: 'user', content: 'Hello'}]
})
console.log(response.message.content)
curl Command Line Call
curl http://localhost:11434/api/chat -d '{
"model": "deepseek-r1:8b",
"messages": [{"role": "user", "content": "Hello, introduce yourself"}]
}'
Third-party Platform Usage (No Deployment)
Don't want to deploy yourself, but need API calls? These platforms provide hosted DeepSeek model services, pay-as-you-go, ready to use.
Hugging Face
The world's largest AI model community, where DeepSeek officially releases all model weights. You can test online inference directly, and also supports Inference API calls.
- All DeepSeek model weights downloadable
- Online inference (Inference API)
- Free tier available
SiliconFlow
A domestic AI model hosting platform providing API services for DeepSeek R1 and V3. Fast access in China, good Chinese support.
- Domestic nodes, low latency
- Compatible with OpenAI API format
- Free quota for new users
Groq
Known for extremely fast inference speed, providing API services for DeepSeek R1 distilled versions. LPU chip inference, much faster than traditional GPUs.
- Extremely fast inference (LPU chip)
- Generous free tier
- Compatible with OpenAI API format
OpenRouter
AI model aggregation platform, unified API interface to access DeepSeek and other models. Convenient for comparing different model effects.
- Unified API, multi-model switching
- Pay-as-you-go, no monthly fee
- Supports streaming output
DeepSeek Web Search in Practice
Web search is one of DeepSeek's most practical features. Once enabled, DeepSeek can search the internet in real time to get the latest information, breaking through the time limitations of the model's training data.
How to Enable Web Search
The web search feature can be enabled with one click in both the official App and the web version, making it very convenient:
How to enable:
- Web version (chat.deepseek.com): Find the "Web Search" button above the input box and click it to enable. The button will be highlighted when activated.
- App: Find the "Web Search" toggle above the conversation input box and tap it to enable. Once enabled, every question will automatically search.
- Note: Web search is independent for each conversation; you need to re-enable it for new conversations.
When Should You Enable Web Search?
Not all questions require web search. It is recommended to enable it in the following scenarios, and disable it in others for faster responses:
- Query real-time news and hot events
- Latest policy and regulation changes
- Stock quotes, cryptocurrency prices
- Weather, flights, sports results
- Latest tech product release information
- Latest academic paper progress
- General knowledge Q&A
- Code writing and debugging
- Text translation and polishing
- Mathematical calculations and reasoning
- Creative writing and brainstorming
- Analysis and summarization of existing documents
Practical Examples: Web Search Prompts
Here are some practical example questions after enabling web search. You can copy and use them directly:
Web Search at the API Level
Currently, the official DeepSeek API does not yet offer web search capability. If you need to implement web search via the API, you can use the following alternatives:
Alternatives:
- RAG architecture: Use LangChain or LlamaIndex to build a retrieval-augmented generation system, first search and then let DeepSeek summarize
- Search API + DeepSeek: Call Google/Bing Search API to get search results, then pass the results as context to the DeepSeek API
- Third-party platforms: Some third-party platforms (such as Perplexity API) have integrated search capabilities and can be called directly
Web Search Tips
- During search, DeepSeek will show the sources of information; click the links to verify the accuracy of the information
- If the search results are not ideal, you can specify the source in the question (e.g., "search Wikipedia")
- Web search will be 2-5 seconds slower than normal conversation, which is normal
For more DeepSeek usage tips, see DeepSeek Usage Guide and DeepSeek Model Details.
DeepSeek Long Text Processing Tutorial
The official DeepSeek app supports a super-long context of 1 million tokens, equivalent to the volume of the Three-Body Trilogy. You can upload an entire book, a whole project codebase, or hours of meeting recordings at once and let AI analyze them for you.
How big is 1 million tokens?
1 million tokens is approximately equivalent to:
~700,000 characters
About the size of the Three-Body Trilogy
~750,000 words
About the size of the complete Harry Potter series
~500,000 lines
Complete codebase of a large project
~100 hours
Meeting recordings transcribed to text
How to upload long documents
Uploading files in the official App or web version is very simple. Here are the detailed steps:
- Find the "Attachment" icon on the left side of the chat input box and click it
- Choose the file you want to upload: PDF, Word, Excel, PPT, TXT, code files, etc.
- Wait for the upload to complete (large files may take a few seconds to tens of seconds)
- Type your question in the input box, e.g., "Please summarize the core content of this document"
- DeepSeek will automatically read the file and answer your question
Practical Scenario 1: Long Document Summarization
Upload a PDF or Word document and let DeepSeek quickly extract the core content:
Practical Scenario 2: Whole Book Q&A
Upload the PDF of an entire novel or professional book, then ask questions as if conversing with the author:
Practical Scenario 3: Whole Project Code Review
Package and upload the code files of the entire project (or upload them one by one) and let DeepSeek perform a comprehensive code review:
Practical Scenario 4: Multi-Document Comparative Analysis
Upload multiple documents at once and let DeepSeek perform a horizontal comparison:
Notes on Using Long Text
- 1 million tokens only available in the official App/Web version: Ollama local deployment defaults to 128K, you need to manually adjust the
num_ctxparameter - Very large files may be processed in segments: If a file exceeds the upload limit, you can upload it in multiple parts and tell DeepSeek "this is a continuation of the same document"
- Processing time is proportional to content volume: Analyzing a 1 million token document may take 30-60 seconds, please be patient
- Output length is limited: Although input can reach 1 million tokens, a single output usually does not exceed 8K tokens
For more DeepSeek feature tutorials, please see DeepSeek Usage Tutorial and DeepSeek Download and Installation Guide.
DeepSeek Prompt Engineering Tips
Master these prompt engineering tips to take your DeepSeek response quality to the next level. Good prompts = good answers. Different models (V3, R1) respond differently to prompts. See DeepSeek Model Architecture for more.
Role-Playing Prompts
Have DeepSeek play a specific role to get more professional and targeted answers. Suitable for writing, coding, tutoring, and more.
Chain-of-Thought Prompts
Guide DeepSeek to think step by step, especially suitable for complex reasoning, math problems, logical analysis, etc. DeepSeek R1 natively supports chain-of-thought, with better results.
Structured Output Prompts
Ask DeepSeek to output in a specific format for easy downstream processing. Suitable for data analysis, report generation, content organization, etc.
Step-by-Step Instruction Prompts
Break down complex tasks into multiple steps, guiding DeepSeek step by step. Suitable for writing, planning, project planning, and other multi-round output scenarios.
DeepSeek vs Other AI Models Comparison
With so many AI models, which one should you choose? The comparison table below gives you a clear overview. Data as of July 2026.
| Comparison Dimension | DeepSeek R1 | ChatGPT | Claude | Gemini |
|---|---|---|---|---|
| Free to Use | Completely Free | Paid Subscription | Paid Subscription | Limited Free |
| Chinese Proficiency | Excellent | Excellent | Good | Excellent |
| Context Length | 1M tokens | 128K tokens | 200K tokens | 1M tokens |
| Open Source | MIT Open Source | Closed Source | Closed Source | Closed Source |
| Local Deployment | Ollama Support | Not Supported | Not Supported | Not Supported |
| API Price per million tokens |
From ¥1 | $15 | $15 | $10 |
| Domestic Access | No VPN needed | VPN required | VPN required | VPN required |
| Chain-of-Thought Reasoning | Native support | o1 series | Partial support | Flash Thinking |
* Data based on public information from each platform in July 2026; prices and features may change at any time. For more model details, see DeepSeek Model Comparison.