Magic Tools
AI TutorialsBy CooconNovember 10, 2026249 views3 min read

OpenAI and DeepSeek API Pricing: New Models, Cache Costs, and Peak Hours

An input/output price pair is no longer enough to estimate an API bill. OpenAI separates processing tiers and cache operations; DeepSeek also separates peak and off-peak usage.

Prices below were checked against official documentation on November 10, 2026. This is a pricing reference with hypothetical calculations, not a quality benchmark or a guide to ChatGPT, Codex, or reseller subscription allowances.

OpenAI's current general-purpose lineup

The current lineup includes GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, and GPT-6 Luna. Each lists a 1.05M-token context window. Capacity alone does not mean every request qualifies for short-context pricing. Official model catalog

USD per million tokens, Standard processing, short context:

Model Input Output Cache read 30m cache write 12h cache write
GPT-6 Astra $10 $50 $1 $12.50 $25
GPT-6.1 Sol $2 $10 $0.10 $2.50 $5
GPT-6.1 Terra $1 $5 $0.05 $1.25 $2.50
GPT-6 Luna $0.10 $0.50 $0.01 $0.125 $0.25

Flex/Batch costs half the Standard rate for these models; Fast costs twice as much. Astra and Sol also have Ultrafast pricing. Long context and regional processing have separate billing conditions. Official pricing

A calculation with explicit assumptions

Assume monthly totals of one million ordinary input tokens, one million cache-read tokens, and one million billed output tokens. Every request qualifies for Standard short-context pricing. Exclude cache writes and tool charges:

Model Calculation Total
GPT-6 Astra 10 + 1 + 50 $61
GPT-6.1 Sol 2 + 0.10 + 10 $12.10
GPT-6.1 Terra 1 + 0.05 + 5 $6.05
GPT-6 Luna 0.10 + 0.01 + 0.50 $0.61

These totals compare identical token volumes, not the measured cost of completing an identical task. Retries and different output volumes can change the result. A useful model evaluation measures success rate, latency, and actual billing on the same workload.

Keep ordinary input, cache writes, and cache reads in separate budget columns. Applying the lowest cache-read price to all input would understate the bill.

DeepSeek: a newer Flash and two time bands

deepseek-flash currently serves DeepSeek-V4.1-Flash-1017; deepseek-v4-pro serves DeepSeek-V4-Pro-0813. The old deepseek-v4-flash name routes to the newer Flash model.

CNY per million tokens:

Model Period Uncached input Cached input Output
V4.1 Flash-1017 Peak ¥2 ¥0.04 ¥8
V4.1 Flash-1017 Off-peak ¥1 ¥0.02 ¥4
V4 Pro-0813 Peak ¥9 ¥0.30 ¥27
V4 Pro-0813 Off-peak ¥4.5 ¥0.15 ¥13.5

Peak hours are Monday–Friday, 09:00–12:00 and 14:00–18:00 Beijing time, excluding Chinese public holidays. Other periods cost half as much. Search and Fetch are separate APIs, each priced at ¥5 per 1,000 successful requests. Official DeepSeek pricing

What moving work overnight changes

For the same assumed volumes—one million uncached input tokens, one million cached input tokens, and one million output tokens—the totals are:

Model Entirely peak Entirely off-peak
V4.1 Flash-1017 2 + 0.04 + 8 = ¥10.04 1 + 0.02 + 4 = ¥5.02
V4 Pro-0813 9 + 0.30 + 27 = ¥36.30 4.5 + 0.15 + 13.5 = ¥18.15

Document processing, offline labeling, and scheduled reports may tolerate this delay. The discount comes from execution time; it should not be described as a DeepSeek Batch API discount.

If a workflow also makes 1,000 successful Search calls and 1,000 successful Fetch calls, add ¥10. Tool requests can become a substantial share of an otherwise inexpensive workflow.

What a useful pricing sheet should preserve

Our older table listed only GPT-5.6 models and older DeepSeek Flash prices. This review shows why model versions and verification dates matter.

Record currency, processing tier, cache category, and—in DeepSeek's case—the time band. For currency conversion, state the exchange rate and date rather than presenting a fixed conversion as a live USD quote.

The examples above are arithmetic estimates under explicit assumptions. Add cache writes, long-context charges, and tools before using them as a budget, then reconcile against real billing. The practical comparison is the total cost of a successfully completed task.

Related Articles

Oracle Cloud Free Tier: Getting a VM, Setting Budget Alerts, and Deploying an SGD 5 Auto-Stop Guard

A deployment report for an Oracle A1 instance that checks monthly tenancy costs every 15 minutes and requests a stop at SGD 5. Covers Free Tier signup, budget alerts, instance-principal permissions, deployment pitfalls, sanitized code, and a ready-to-use Claude Code/Codex prompt. Authorization, cost queries, and scheduled execution were verified; a real over-budget shutdown was not tested.

cost-controlhands-on+3
hands-onNov 9, 202610 min
3040

Claude Code Auto Mode with DeepSeek, GLM or Kimi: What Each "temporarily unavailable" Reason Means and When Retrying Is Pointless (Fault-Injection Test)

On a third-party model, Claude Code auto mode sends one extra classifier request per side-effecting action, from your session model to the same backend: a 132,470-character system prompt, about 29.7K input tokens per check. When it fails, you see "xxx is temporarily unavailable, so auto mode cannot determine the safety of Bash". We injected faults and recorded each message: 500 (server error), 429 (rate-limited), 529 (overloaded) and connection resets (connection failed) are retried 5 times; no reply in 60 s gives (timed out). **No parentheses means a 4xx rejection: tried once, and retrying never helps.** A reply with no verdict gives "could not evaluate"; three in a row bring back manual approval. CLAUDE_CODE_AUTO_MODE_MODEL has no effect. Claude Code 2.1.285, real DeepSeek v4-pro and MiMo v2.5 backends.

claude-codedeepseek+7
pitfallsOct 11, 202612 min
801

Claude Code "Prompt is too long" vs "maximum context length": Why Auto-Compact Works for One and Not the Other (Tested)

Claude Code decides a request was too long by matching the error text. If the backend says prompt is too long or input is too long for requested model, it auto-compacts the conversation and retries — invisible to you. DeepSeek and OpenAI-style gateways say This model's maximum context length is …, which it doesn't recognize: you get API Error: 400 on every turn. Manual /compact works; the better fix is to declare the real window with CLAUDE_CODE_MAX_CONTEXT_TOKENS (non-claude- model IDs) or CLAUDE_CODE_AUTO_COMPACT_WINDOW (claude- IDs) so it compacts before hitting the limit. Tested on Claude Code 2.1.285 against a local stub.

claude-codedeepseek+6
pitfallsOct 5, 20267 min
795
DeepSeek Harness Test: One Model, Three Harnesses — Claude Code 15/15, Codex CLI 15/15, Bare API 0/15 (and 5 Fake "Done"s)

DeepSeek Harness Test: One Model, Three Harnesses — Claude Code 15/15, Codex CLI 15/15, Bare API 0/15 (and 5 Fake "Done"s)

Same DeepSeek model (deepseek-v4-pro), three harnesses, five tasks (read / write / edit / run a command / multi-step), three rounds each, every side effect checked on disk. Claude Code on DeepSeek's Anthropic endpoint: 15/15, median 4.17s, ¥0.159 per task. Codex CLI 0.157.1 on the Responses endpoint: 15/15, median 15.52s, ¥0.022 per task — one seventh. Bare chat/completions: 0/15, and 5 of those rounds replied DONE or EDITED with nothing on disk. The differences are the harness: DeepSeek partitions its prompt cache by metadata.user_id, so every `claude -p` pays ~15K uncached tokens; Codex has no file tools and does everything through shell; on HTTP 500 Claude Code retries 10 times over ~175s while Codex quits in ~25s, and on 429 Codex doesn't retry; on 120KB of output Claude Code shows the first 2KB, Codex head + tail. And wire_api = "chat" is gone in Codex 0.157.1 — use responses.

claude-codeprompt-caching+6
hands-onSep 28, 202613 min
736

Published by Magic Tools