/>
Pricing verified as of 2026-08-19. DeepSeek changed to peak/off-peak pricing on 2026-08-17.
Pricing updated 2026-08-19: AIWave V4 Flash is $0.638 input, $1.914 output, and $0.0203 cache hit; V4 Pro is $1.914 input, $5.742 output, and $0.0638 cache hit per 1M tokens.
A rate comparison only holds for a stated token mix and date. Recalculate it against your workload before changing traffic.
In this guide, you'll learn everything about the DeepSeek V4 API: how to get started, pricing details, code examples in Python and Node.js, and a direct comparison with DeepSeek V3, DeepSeek V3.2, and GPT-4.
DeepSeek V4 (also known as DeepSeek V4 Pro) is part of a broader ecosystem of Chinese AI models including Baidu's ERNIE 4.0 and Zhipu's GLM-5 is the fourth-generation large language model from DeepSeek. Released as an open-weight model, it offers:
There are two variants: DeepSeek V4 Pro (the full flagship model) and DeepSeek V4 Flash (a faster, more affordable option). Both are available through the AIWave API.
| Model | Input (per 1M tokens) | Output (per 1M tokens) | Context |
|---|---|---|---|
| DeepSeek V4 Pro | $1.914 | $5.742 | 128K |
| DeepSeek V4 Flash | $0.638 | $1.914 | 128K |
| DeepSeek V3 (previous gen) | $0.27 | $1.10 | 64K |
| GPT-4o (for comparison) | $2.50 | $10.00 | 128K |
💡 Key insight: DeepSeek V4 Pro is ~18x compared with GPT-4o on input, making it the best price-performance option for most applications. Compared to DeepSeek V3, it's nearly half the price with better performance.
To use the DeepSeek V4 API, you need an API key from a provider. With AIWave, Top-ups start at $5 at checkout. instantly — no credit card required.
→ Sign up at AIWave and grab your API key in under 2 minutes.
DeepSeek V4 uses the OpenAI-compatible API format, so you can use the standard openai Python package or the official AIWave SDK:
# Option 1: Standard OpenAI SDK
pip install openai
# Option 2: AIWave SDK (recommended)
pip install aiwave
For Node.js:
# Option 1: Standard OpenAI SDK
npm install openai
# Option 2: AIWave SDK (recommended)
npm install aiwave
Python Example:
from openai import OpenAI
client = OpenAI(
base_url="https://aiwave.live/v1",
api_key="your-api-key-here"
)
response = client.chat.completions.create(
model="deepseek-v4-pro",
messages=[
{"role": "user", "content": "Explain the advantages of DeepSeek V4 over DeepSeek V3."}
]
)
print(response.choices[0].message.content)
Node.js Example:
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://aiwave.live/v1',
apiKey: 'your-api-key-here'
});
const response = await client.chat.completions.create({
model: 'deepseek-v4-pro',
messages: [
{ role: 'user', content: 'Compare DeepSeek V4 vs DeepSeek V3 architecture.' }
]
});
console.log(response.choices[0].message.content);
from openai import OpenAI
client = OpenAI(
base_url="https://aiwave.live/v1",
api_key="your-api-key-here"
)
stream = client.chat.completions.create(
model="deepseek-v4-pro",
messages=[{"role": "user", "content": "Write a quick tutorial on DeepSeek V4 API streaming."}],
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
| Feature | DeepSeek V4 Pro | DeepSeek V3 | GPT-4o |
|---|---|---|---|
| Context Window | 128K | 64K | 128K |
| Input Price (1M tokens) | $1.914 | $0.27 | $2.50 |
| Output Price (1M tokens) | $5.742 | $1.10 | $10.00 |
| Coding | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Reasoning | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Multilingual | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Availability | ✅ AIWave API | ✅ AIWave API | OpenAI-only |
| No regional mobile | ✅ Yes | ✅ Yes | N/A |
🎯 Recommendation: For most applications, DeepSeek V4 Pro offers the best balance of performance and cost. Use DeepSeek V4 Flash for high-throughput, cost-sensitive workloads. DeepSeek V3 remains a solid fallback option for legacy integrations.
from openai import OpenAI
client = OpenAI(
base_url="https://aiwave.live/v1",
api_key="your-api-key-here"
)
tools = [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string", "description": "City name"}
},
"required": ["location"]
}
}
}
]
response = client.chat.completions.create(
model="deepseek-v4-pro",
messages=[{"role": "user", "content": "What's the weather in San Francisco?"}],
tools=tools
)
print(response.choices[0].message.tool_calls)
For tasks that require step-by-step reasoning, DeepSeek R1 (also known as DeepSeek Reasoner) is the specialized chain-of-thought model. While DeepSeek V4 handles most tasks, DeepSeek R1 excels at complex math, logic puzzles, and multi-step problems.
Both models are available through the same AIWave API key — just change the model parameter.
| Model | Best For | Price (Input) |
|---|---|---|
| deepseek-v4-pro | Workload-specific evaluation required. | $1.914/M tokens |
| deepseek-v4-flash | Fast & affordable | $0.638/M tokens |
| deepseek-reasoner | Chain-of-thought reasoning | $0.55/M tokens |
| deepseek-v3 | Legacy, fallback | $0.27/M tokens |
All DeepSeek models, along with ERNIE 4.0 (Baidu), GLM-5, and Chinese AI routes from 9 Chinese AI providers, are available through the AIWave API. Use one API key to access DeepSeek V4, V3, R1, and Chinese AI routes from 9 Chinese AI providers including GLM-5, Kimi K2, ERNIE 4.0, and Qwen.
Use a $5 minimum top-up. No credit card. No regional mobile
Get Your API Key →Change one line of code. That's it.
Yes. DeepSeek V4 significantly outperforms DeepSeek V3 on coding, reasoning, and multilingual benchmarks, while being nearly half the price. The V4 model family includes both Pro (flagship) and Flash (fast/affordable) variants.
Absolutely. AIWave provides a 100% OpenAI-compatible API. Just change your base_url to https://aiwave.live/v1 and use the standard OpenAI SDK. No code changes needed.
DeepSeek V4 Pro is the full flagship model with maximum performance. DeepSeek V4 Flash is optimized for speed and cost, making it ideal for high-volume production applications.
Yes. DeepSeek V4 Pro supports function calling (tools), JSON mode, and streaming, making it suitable for production applications.
DeepSeek R1 (Reasoner) is a specialized chain-of-thought model for complex reasoning tasks. While DeepSeek V4 handles general tasks efficiently, R1 excels at step-by-step problem solving. Both are available through the same API key.
Related: DeepSeek API pricing · DeepSeek V4 Pro
Test DeepSeek V4 Pro on your acceptance set, then compare the dated rate and request record.
Explore Models →