QVeris
Cost Optimization Guide成本优化指南

Cheap LLM API
The Cheapest Token Can Be an Expensive Result
便宜的 LLM API:最低 Token 单价不等于最低总成本

Model prices change frequently and rarely tell the full story. Compare exact endpoints on your workloads and calculate total cost per accepted output, including retries, failures, latency, engineering, platform fees and quality review.

模型价格经常变化,也很少能说明全部成本。应在自身负载上比较具体端点,并计算每个可接受输出的总成本,包括重试、失败、延迟、工程、平台费用与质量审核。

True cost laboratory calculating LLM API cost per accepted output across three workloads

TL;DR

Do not copy stale price tables

Use current official pricing and billing units on the day of evaluation; record model, endpoint, region, cache, reasoning and batch terms.

Benchmark quality first

A low-cost model that fails schema, tool or accuracy thresholds creates retries, review and customer cost.

Calculate accepted-result cost

Add input, output, reasoning, cache, retries, failed outputs, platform fees, latency impact and engineering effort, then divide by accepted results.

Route by workload

Extraction, support and agent tools have different quality and reliability thresholds; one cheapest model rarely wins all three.

不要复制过期价格表

评估当天使用官方最新价格与计费单位,并记录模型、端点、区域、缓存、推理与批处理条款。

先做质量基准

无法满足结构定义、工具或准确率阈值的低价模型会产生重试、审核与客户成本。

计算可接受结果成本

把输入、输出、推理、缓存、重试、失败输出、平台费、延迟影响与工程投入相加,再除以可接受结果数。

按工作负载路由

抽取、客服与智能体工具的质量和可靠性阈值不同;一个最低价模型很少能赢下全部。

Cheap access comes through four supply paths低价访问有四种供给路径

Direct model APIs offer native features and pricing. Aggregators consolidate models and billing, sometimes with markup or credits. Hosted inference platforms expose open models through serverless or dedicated endpoints. Self-hosted inference trades provider margin for infrastructure and operations.

模型直连 API 提供原生功能与定价;聚合器整合模型与账单,有时存在加价或 Credits;托管推理平台通过无服务器或专属端点暴露开放模型;自托管推理用基础设施与运维换取供应商利润空间。

The cheapest path depends on utilization, endpoint quality, provider competition, committed spend, cache hit rate, batching, latency and engineering capacity. Verify official pricing rather than relying on fixed claims in an evergreen article.

最便宜路径取决于利用率、端点质量、供应商竞争、承诺支出、缓存命中、批处理、延迟与工程能力。应核对官方价格,不依赖常青文章中的固定数字。

Compare supply models, not a frozen price list比较供给模式,而非冻结价格表

Supply path供给路径Best fit最适合Verify before choosing选择前验证
Direct provider API供应商直连 APINative features, direct support, clear provenance and existing commercial commitments.原生功能、直接支持、清晰来源与既有商业承诺。Compare regional availability, quotas, failover options, billing units and multi-provider engineering.比较区域可用性、配额、回退选项、计费单位与多供应商工程。
Model aggregator模型聚合器One key, broad catalog, consolidated billing and provider competition for the same model.一把密钥、广泛目录、统一账单与同模型供应商竞争。Verify markup, credits, provider identity, privacy filters, parameter support and fallback charges.验证加价、Credits、供应商身份、隐私过滤、参数支持与回退费用。
Hosted inference platform托管推理平台Serverless access or dedicated capacity for open and specialized models.面向开放与专用模型的无服务器访问或专属容量。Pin version and endpoint; model cold starts, capacity, quantization, support and idle cost.固定版本与端点;验证冷启动、容量、量化、支持与闲置成本。
Self-hosted inference自托管推理High utilization, privacy, custom hardware or model control can justify owned serving.高利用率、隐私、自定义硬件或模型控制可证明自有 Serving 合理。Include GPUs, idle capacity, scaling, drivers, upgrades, observability, staffing and outage risk.包含 GPU、闲置容量、扩缩、驱动、升级、可观测、人力与中断风险。
Gateway optimization网关优化Routing, cache, fallback, batching and model tiering reduce cost across existing supply.路由、缓存、回退、批处理与模型分层可降低既有供给成本。Avoid duplicate retries and opaque substitutions; reconcile gateway and provider bills.避免重复重试与不透明替换,并核对网关与供应商账单。

The total-cost equation总成本公式

Model usage

Input, output, reasoning, cache reads/writes, embeddings, images, audio, tools and batch units.

Failure and quality

Retries, timeouts, fallback calls, invalid schemas, rejected answers, human review, escalation and customer impact.

Platform and operations

Markup, subscriptions, credits, infrastructure, telemetry, storage, egress, support, engineering and incidents.

Accepted result

Define task-level acceptance before the benchmark: accuracy, schema, tool success, safety, latency and policy compliance.

模型用量

输入、输出、Reasoning、缓存读写、Embedding、图像、音频、工具与批处理单位。

失败与质量

重试、超时、回退调用、无效结构定义、拒绝答案、人工审核、升级与客户影响。

平台与运维

加价、订阅、Credits、基础设施、遥测、存储、出口、支持、工程与事故。

可接受结果

在基准前定义任务级接受标准:准确率、结构定义、工具成功、安全、延迟与策略合规。

Build a live cost benchmark构建实时成本基准

  • Pull current official prices and terms; timestamp the data and pin exact model and endpoint identifiers.
  • Run representative distributions for extraction, support and agent tools with task-specific acceptance thresholds.
  • Measure usage, cache, latency, retries, fallback, invalid outputs, review and accepted-result rate.
  • Reconcile provider receipts and platform ledgers, then run sensitivity analysis for traffic and price changes.
  • 提取官方最新价格与条款,记录时间戳并固定具体模型和端点标识。
  • 用任务特定接受阈值运行抽取、客服与智能体工具的代表性分布。
  • 测量用量、缓存、延迟、重试、回退、无效输出、审核与可接受结果率。
  • 核对供应商回执与平台账本,再对流量和价格变化做敏感性分析。

Use an auditable cost ledger per workload为每个负载使用可审计成本账本

Tag every request with workload, tenant, experiment, route policy and acceptance result. Store native usage beside normalized units, provider endpoint, cache state, retry chain, fallback, latency, platform fee and final quality verdict. Recompute costs from versioned price tables so price changes do not rewrite historical evidence.

为每个请求标注工作负载、租户、Experiment、路由策略与接受结果。并排存储原生用量与标准化单位、供应商端点、缓存状态、重试链、回退、延迟、平台费与最终质量结论。基于版本化价格表重算成本,避免价格变化改写历史证据。

Production rule: optimize cost per accepted business outcome; token price is one input, never the objective by itself.

生产规则:优化每个可接受业务结果的成本;Token 单价只是输入,不能单独作为目标。

Include capability-call cost in agent economics在智能体经济性中包含能力调用成本

For agents, inference is only part of the bill. QVeris can expose estimated and billed cost for external API and tool execution. Join model usage with QVeris search and execution evidence to calculate total workflow cost per successful outcome.

对智能体而言,推理只是账单的一部分。QVeris 可以呈现外部 API 与工具执行的预估和实付成本。把模型用量与 QVeris 搜索和执行证据连接,计算每个成功结果的完整工作流成本。

What the same token workload costs at list price同一 Token 工作负载的目录价成本

For a simple comparison, assume 2 million uncached input tokens and 500,000 output tokens. The arithmetic below uses official list prices verified July 21, 2026 and excludes tools, storage, regional premiums, gateway fees, discounts, taxes, and retries. It is a cost example, not a quality ranking.

假设工作负载包含 200 万未缓存输入 Token 与 50 万输出 Token。以下计算使用 2026 年 7 月 21 日核验的官方目录价,不含工具、存储、区域溢价、网关费、折扣、税费与重试;它是成本示例,不是质量排名。

Model or route模型或路由Input / cost输入/成本Output输出Scope适用范围
OpenAI GPT-5.6 Luna$5.002 × $1 + 0.5 × $62M input + 0.5M output两百万输入加五十万输出
Claude Haiku 4.5$4.502 × $1 + 0.5 × $52M input + 0.5M output两百万输入加五十万输出
Gemini 3.1 Flash-Lite$1.252 × $0.25 + 0.5 × $1.50Standard service tier标准服务层价格
DeepSeek V4 Flash$0.422 × $0.14 + 0.5 × $0.28Cache-miss input未命中缓存输入

Always verify the linked official pricing source immediately before a buying decision. Model quality, output length, cacheability, retries, tools, service tier, region, taxes, and discounts can reverse a token-price comparison.

采购决策前务必立即核验页面所链接的官方定价来源。模型质量、输出长度、可缓存性、重试、工具、服务层、区域、税费与折扣都可能逆转 Token 单价比较。

FAQ

Which LLM API is cheapest?

It changes by model, endpoint, workload and date. Use current official prices plus a workload benchmark and accepted-result calculation.

Are aggregators cheaper?

Sometimes provider competition or consolidated operations helps; markup, credits, routing and endpoint quality can also increase cost.

Does caching always save money?

Only for eligible repeated content with acceptable staleness and a cache price lower than avoided recomputation and risk.

哪个 LLM API 最便宜?

答案随模型、端点、负载与日期变化;应结合官方最新价格、负载基准与可接受结果计算。

聚合器更便宜吗?

供应商竞争或统一运营有时有利;加价、Credits、路由与端点质量也可能增加成本。

缓存总能省钱吗?

只有内容可重复、陈旧度可接受,且缓存价格低于避免的重算与风险时才成立。

Official sources and further reading官方资料与延伸阅读