QVeris
Cost Optimization Guide

Cheap LLM API
The Cheapest Token Can Be an Expensive Result

Compare exact LLM endpoints on real workloads and rank total cost per accepted output, including retries, latency, platform fees, and review.

Published: March 19, 2026 · By the QVeris Team

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

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.

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 Native 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.
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. Include GPUs, idle capacity, scaling, drivers, upgrades, observability, staffing and outage risk.
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.

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.

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

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.

What the same token workload costs at list price

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.

Model or route Input / cost Output Scope
OpenAI GPT-5.6 Luna $5.00 2 × $1 + 0.5 × $6 2M input + 0.5M output
Claude Haiku 4.5 $4.50 2 × $1 + 0.5 × $5 2M input + 0.5M output
Gemini 3.1 Flash-Lite $1.25 2 × $0.25 + 0.5 × $1.50 Standard service tier
DeepSeek V4 Flash $0.42 2 × $0.14 + 0.5 × $0.28 Cache-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.

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.

Official sources and further reading