Models and prices / deepseek-v4-pro

DeepSeek V4 Pro 49% off at peak

DeepSeek's flagship model for hard reasoning, coding and long agent tasks.

OpenAI compatibleAnthropic compatible

Pricing

Item (USD per 1M tokens)Price
Input
$0.6716 Peak
$0.6045 Off-peak
Cached input
$0.0224 Peak
$0.0201 Off-peak
Output
$2.0149 Peak
$1.8134 Off-peak
  • Send deepseek-v4-pro as the model.
  • This model has peak and off-peak prices; see peak hours in your time zone below.
  • Cached input is the part of a prompt served from the context cache. The struck-through price is the model maker's own price.
  • Thinking is billed as output tokens. Set max_tokens to 1000 or more, or the budget may go to thinking alone.
  • When you do not need reasoning, add "thinking": {"type": "disabled"} to the request, or use "reasoning_effort": "low": simple tasks get noticeably cheaper and faster.

Specs

Context window1M tokens
Longest answer384K tokens
Inputtext
APIsOpenAI Chat Completions, Anthropic Messages
Reasoning (thinking)Yes, billed as output tokens

Peak hours in your time zone

Models marked Peak / Off-peak cost less outside peak hours. The price is set by when the request arrives. Peak hours are 09:00–12:00 and 14:00–18:00 (UTC+8), Monday to Friday. Weekends (UTC+8) are off-peak all day. In local time this week:

Time zonePeak hours (all other times are off-peak)
UTC (UTC)Mon–Fri 01:00–04:00 and 06:00–10:00
London (UTC+1)Mon–Fri 02:00–05:00 and 07:00–11:00
Paris, Berlin, Amsterdam (UTC+2)Mon–Fri 03:00–06:00 and 08:00–12:00
New York, Toronto (US Eastern) (UTC-4)Sun–Thu 21:00–24:00
Mon–Fri 02:00–06:00
Los Angeles, Vancouver (US Pacific) (UTC-7)Sun–Thu 18:00–21:00 and 23:00–03:00 next day
India (UTC+5:30)Mon–Fri 06:30–09:30 and 11:30–15:30
Bangkok, Jakarta, Ho Chi Minh City (UTC+7)Mon–Fri 08:00–11:00 and 13:00–17:00
Singapore, Kuala Lumpur, Manila, Hong Kong (UTC+8)Mon–Fri 09:00–12:00 and 14:00–18:00
Tokyo, Seoul (UTC+9)Mon–Fri 10:00–13:00 and 15:00–19:00
Sydney (UTC+11)Mon–Fri 12:00–15:00 and 17:00–21:00

Times follow daylight saving time and are shown for the current week.

Call it with the OpenAI API

curl https://api.aifans.fan/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek-v4-pro", "messages": [{"role": "user", "content": "Hello"}], "max_tokens": 1000}'
# pip install openai
from openai import OpenAI

client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.aifans.fan/v1")
resp = client.chat.completions.create(
    model="deepseek-v4-pro",
    messages=[{"role": "user", "content": "Hello"}],
    max_tokens=1000,
)
print(resp.choices[0].message.content)

Use it in Claude Code

Put this in ~/.claude/settings.json (Windows: %USERPROFILE%\.claude\settings.json) and start Claude Code.

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.aifans.fan",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_MODEL": "deepseek-v4-pro",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "deepseek-v4-pro",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "deepseek-v4-pro",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-v4-pro",
    "CLAUDE_CODE_SUBAGENT_MODEL": "deepseek-v4-pro"
  }
}