DeepSeek pricing: models and monthly cost

Compare both DeepSeek V4 models by input, cache-hit and output rates. DeepSeek publishes a peak rate and an off-peak (valley) rate; Code By AI prices the valley rate all day.

Every number on this page uses DeepSeek's off-peak (valley) list rate around the clock, with no peak surcharge. The list-price column, savings percentage and monthly example are calculated from those valley rates. Neither model is a channel default: send deepseek-v4.1-flash or deepseek-v4-pro explicitly.

What a working month costs

Computed on deepseek-v4.1-flash. The example workload is 20M input and 2M output tokens; official and Code By AI prices use the same tokens.

Usage tierInput / output tokensList priceCode By AISaving
Light5M / 500K$1.05$0.3270%
Regular20M / 2M$4.20$1.2670%
Heavy80M / 8M$16.80$5.0470%

Set up DeepSeek

Export OPENAI_BASE_URL=https://www.codebyai.net/api/agent and OPENAI_API_KEY, then send OpenAI-compatible Chat Completions requests with an explicit model ID.

export OPENAI_BASE_URL="https://www.codebyai.net/api/agent"
export OPENAI_API_KEY="sk-proj-xxxx"

# OpenAI-compatible Chat Completions; send one explicit model ID:
#   deepseek-v4.1-flash  or  deepseek-v4-pro
curl "$OPENAI_BASE_URL/v1/chat/completions" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"deepseek-v4.1-flash","messages":[{"role":"user","content":"Hello"}]}'

Read the DeepSeek setup guide

DeepSeek models and token rates

ModelList priceYou pay
deepseek-v4.1-flash$0.15 / $0.003 / $0.60$0.045 / $0.0009 / $0.18
deepseek-v4-pro$0.66 / $0.022 / $1.98$0.198 / $0.0066 / $0.594

per 1M tokens (input / cache hit / output)

FAQ

How much does deepseek-v4.1-flash cost per month?
For the example month, deepseek-v4.1-flash costs $4.20 at list price and $1.26 through Code By AI.
Can I use DeepSeek with the same key?
Yes. One Code By AI key works for DeepSeek and the other channels. Use the protocol and model ID shown in the guide.
Where do I set up DeepSeek?
Use the DeepSeek setup guide linked on this page. It covers the exact config file and model IDs for DeepSeek.