对你的场景,哪个 LLM 最便宜?

输入 token 数和请求量,所有模型将并列显示单次/每日/月度成本。价格可编辑。

{{ __t('usage_section') }}
{{ __t('cache_hint') }}

{{ __t('cost_comparison') }}
{{ __t('model') }} {{ __t('th_in') }}
$/Mtok
{{ __t('th_out') }}
$/Mtok
{{ __t('th_cache_read') }}
$/Mtok
{{ __t('th_per_request') }}
$
{{ __t('th_per_day') }}
$
{{ __t('th_per_month') }}
$
{{ m.name }}
{{ m.vendor }}
{{ calcRequest(m).toFixed(5) }} {{ calcDay(m).toFixed(2) }} {{ calcMonth(m).toFixed(2) }}
{{ __t('note_label') }}: {{ __t('prices_disclaimer') }}

LLM API 成本是怎么构成的?

厂商按百万 token(Mtok)计费,输入与输出分别计价。许多家提供缓存价:稳定上下文可缓存,再次读取仅需输入价的一小部分。系统提示重用率高时,可省去输入侧 50–90% 的费用。

实践:如何选最便宜但够用的模型

分类、摘要、简单抽取等任务:小模型(Haiku、GPT-4o mini、Gemini Flash、DeepSeek)比顶级便宜20–100倍,可覆盖80%场景。推理、代码、多跳任务建议用 Opus、GPT-4o、Gemini Pro。生产中加路由层可省40–70%。

降低账单的小贴士

  • 用提示缓存:把系统提示和大段固定上下文标为缓存块——Anthropic、OpenAI、Google 都支持。
  • 压短输出——输出常是输入的3–5倍。用结构化 JSON 代替冗长散文。
  • 用 Batch API:异步批处理在 Anthropic、OpenAI 上比实时便宜 50%。