DeepSeek AI offers powerful language models accessible through their API, enabling developers to integrate advanced AI capabilities into their applications. This article breaks down the DeepSeek API pricing structure, helping you estimate costs and optimize your usage.
DeepSeek API uses a token-based pricing model. A token is the fundamental unit of text the model processes, which can be a word, number, or punctuation mark. You are billed based on the total number of tokens processed for both input and output. This approach allows for granular cost management as you only pay for what you use.
The pricing varies depending on the model used, context length, and whether or not context caching is utilized. Here is a breakdown of the pricing structure:
DeepSeek API Pricing (USD)
Model | Context Length | Max CoT Tokens | Max Output Tokens | 1M Tokens Input Price (Cache Hit) | 1M Tokens Input Price (Cache Miss) | 1M Tokens Output Price |
---|---|---|---|---|---|---|
deepseek-chat | 64K | - | 8K | $0.07 | $0.27 | $1.10 |
deepseek-reasoner | 64K | 32K | 8K | $0.14 | $0.55 | $2.19 |
DeepSeek API Pricing (CNY)
Model | Context Length | Max CoT Tokens | Max Output Tokens | 1M Tokens Input Price (Cache Hit) | 1M Tokens Input Price (Cache Miss) | 1M Tokens Output Price |
---|---|---|---|---|---|---|
deepseek-chat | 64K | - | 8K | ¥0.5 | ¥2 | ¥8 |
deepseek-reasoner | 64K | 32K | 8K | ¥1 | ¥4 | ¥16 |
deepseek-chat
, now incorporating DeepSeek-V3, is designed for conversations, while deepseek-reasoner
, powered by DeepSeek-R1, excels at complex reasoning tasks. Choose the model best suited for your application. You can find more information about the reasoning model in the API Guides.deepseek-reasoner
model utilizes CoT, which is the reasoning process it undertakes before providing a final answer. The output token count includes both the CoT and the final answer, priced equally. Therefore, the complexity of the reasoning needed for the API call can affect costs.max_tokens
parameter to support longer outputs, impacting the total cost.The fundamental calculation is:
Expense = Number of Tokens × Price per Token
The total expense depends on:
DeepSeek deducts fees directly from your topped-up or granted balance, prioritizing the granted balance if available.
Keep abreast of pricing changes by regularly consulting the Models & Pricing section of the DeepSeek API documentation. DeepSeek reserves the right to adjust pricing, so proactive monitoring helps avoid surprises.
By understanding DeepSeek's token-based pricing model, the nuances of context length and CoT, you can effectively manage your API costs and optimize your usage for maximum value. Always refer to the official DeepSeek API documentation for the most current and comprehensive information.