For many AI teams, LLM spend is no longer an experimental line item. But the key question is not whether open-weight or proprietary models have the lower headline token price. It is which architecture delivers the required quality, latency, reliability, compliance, and cost per successful task for a specific workload.
Proprietary APIs often provide the simplest starting point for low, uncertain, or rapidly changing demand. Self-hosted open-weight models may become economically attractive when demand is sustained, utilization is high, the model meets the quality threshold, and the organization can support the operational requirements. Hosted open-model APIs offer another option: they can provide access to open-weight models without requiring the team to operate GPU infrastructure.
Pricing note: API, GPU, and platform prices change frequently and may vary by region, billing tier, service level, promotion, model version, and contract. The figures in this article are illustrative planning examples — verify current rates on each provider’s pricing page before making a purchasing or architecture decision.
KEY TAKEAWAYS
The most visible number in an LLM comparison is usually the provider’s price per million input and output tokens. That number is useful, but it does not answer the full budget question.
A production comparison should include at least five categories:
A useful baseline:
Total monthly cost = variable usage cost + fixed platform cost + operations cost + allocated engineering cost + transition cost
For quality-sensitive workloads, also track cost per successful task: total cost divided by tasks meeting the agreed quality and latency threshold. A lower-cost model may require more retries, longer prompts, additional verification, or human review — a lower token rate does not automatically produce a lower cost per business outcome.
Commercial LLM APIs generally charge separately for input and output tokens. Output is often more expensive than input, but the ratio varies by provider and model — check the current rate card before estimating costs.
API pricing may also include several modifiers:
For current rates, consult the OpenAI API pricing page, Anthropic pricing documentation, and Google Gemini API pricing documentation.
The table below illustrates how commercial rate cards may be structured. It is not intended to rank providers or serve as a permanent market comparison — verify prices and model availability directly on each provider’s page.
| Provider | Example model | Standard input | Cached input / cache hit | Output | Pricing note |
|---|---|---|---|---|---|
| OpenAI | Current model | Model-specific | Model-specific | Model-specific | Check current model, context, and promotional terms on the official rate card |
| Anthropic | Current model | Model-specific | Model-specific | Model-specific | Cache-write and cache-hit rates may be separate |
| Current Gemini model | Model-specific | Model-specific | Model-specific | Context-caching, storage, and other terms may apply |
Consider a support workflow processing 50,000 conversations each month, where each conversation generates 2,000 input tokens and 500 output tokens, with no tool call, at $2 per million input tokens and $10 per million output tokens.
If a second tool call adds 1,000 input tokens and 500 output tokens per conversation, the incremental volume — 50 million input tokens and 25 million output tokens — adds $100 and $250 respectively, bringing the model-only subtotal to $800 per month. The actual impact of a tool call depends on schema size, arguments, results, repeated context, model turns, retries, and caching — measure it from representative traces rather than applying a universal multiplier.
Basic API cost = input tokens × input rate + output tokens × output rate.
A more complete production formula: Total API cost = standard input + cached input + cache writes + output + batch/service-tier adjustments + tool and retrieval charges + platform charges.
“Open-source” and “open-weight” are not interchangeable terms. Open-weight refers to models whose trained parameters are available for download but whose training data, code, or license may impose additional conditions.
| Deployment option | What the team pays for | Main economic profile |
|---|---|---|
| Proprietary API | Tokens and provider services | Variable cost, low initial commitment |
| Hosted open-model API | Tokens or hosted inference | Variable cost, limited infrastructure burden |
| Managed dedicated inference | Dedicated GPU capacity and platform fees | Semi-fixed cost, reduced operations burden |
| Self-hosted open-weight model | GPUs, platform, engineering, and operations | Fixed capacity cost, potentially lower marginal cost at high utilization |
Self-hosting does not make inference free — it changes the billing structure from a metered API bill to a combination of accelerator capacity, platform services, engineering labor, and operational risk. Before using any model commercially, check the model card and license directly; the Open Source AI Definition explains why access to weights alone doesn’t establish that a model is open source.
Cloud GPU costs vary by provider, region, instance type, purchasing model, and availability. Neocloud providers may offer lower hourly rates than hyperscalers, while hyperscalers may offer stronger enterprise integration, compliance controls, and support. For current infrastructure pricing, consult the AWS EC2 pricing page, AWS Capacity Blocks pricing, Lambda pricing, and RunPod pricing.
Monthly compute cost = hourly GPU rate × 730. This is a compute-only planning estimate; it excludes or may not fully represent storage, networking, orchestration, monitoring, redundancy, support, and engineering labor.
A GPU’s hourly price does not determine cost per million tokens — that requires measured useful throughput: cost per million tokens = total hourly serving cost ÷ useful tokens served per hour × 1,000,000. Useful throughput depends on the model, precision, context length, batching, concurrency, input/output mix, and latency target. See the vLLM documentation for current serving and benchmarking guidance.
A dedicated GPU incurs cost during idle periods. For example, if a GPU costs $3,000 per month in compute:
These are capacity-allocation examples, not provider invoices. They show why self-hosting can look attractive in a high-volume benchmark but unattractive when traffic is uncertain or spiky. High availability adds further fixed cost: two replicas for failover may roughly double accelerator capacity before autoscaling headroom or multi-zone deployment. A single GPU may suit development or low-availability workloads, but it shouldn’t be treated as a universal production architecture.
Model weights are only one part of serving memory — KV cache, runtime overhead, batching, context length, and concurrency also require headroom. Consult the current model card and deployment documentation rather than inferring hardware requirements from parameter count alone. Quantization can substantially reduce memory requirements, but the result depends on the checkpoint, quantization format, runtime, context length, and serving configuration; benchmark quality, latency, throughput, and failure rates before production deployment.
A production RAG system may incur costs for document extraction, chunking, embeddings, vector search, reranking, object storage, metadata stores, network traffic, and application hosting — costs that can remain even when the generation model changes.
Self-hosting requires more than downloading weights and exposing an endpoint. The operating model may include deployment automation, GPU scheduling, model updates, health checks, observability, autoscaling, incident response, capacity planning, security controls, and evaluation after model or prompt changes. Monthly operations cost = allocated engineering cost + on-call cost + platform overhead. If a team doesn’t already operate GPU inference, the first relevant cost may be engineering time or specialist support rather than the accelerator itself.
Fine-tuning costs depend on model size, training method, dataset volume, sequence length, GPU type, number of experiments, and evaluation requirements. LoRA and QLoRA may reduce compute requirements, but full cost also includes data preparation, experiment management, validation, and deployment. RAG and prompt engineering create recurring costs too — a lower-cost model needing more retrieval context or verification may not be cheaper at the workflow level.
Migration costs can include prompt retuning, API integration, structured-output validation, tool-call changes, regression testing, safety review, and quality revalidation. Downloadable weights do not necessarily imply unrestricted commercial use.
There is no universal token-volume threshold at which self-hosting becomes cheaper. The break-even point depends on the model, GPU provider, workload shape, quality target, throughput, utilization, redundancy, engineering effort, and the API being displaced.
| Decision factor | Often favors an API | May favor dedicated or self-hosted inference |
|---|---|---|
| Demand | Low, uncertain, or highly spiky | High, sustained, and forecastable |
| Utilization | Low or variable | High enough to keep capacity busy |
| Quality | Frontier capability or rapid model access | A selected model meets the required threshold |
| Latency | Provider-managed elasticity is valuable | Stable, predictable latency is valuable |
| Compliance | Provider controls satisfy requirements | Data residency or isolation requires private deployment |
| Team capability | Limited MLOps or GPU experience | Existing platform and inference expertise |
| Iteration speed | Frequent model and prompt changes | Stable workload with measured behavior |
| Availability | Provider SLA is sufficient | Team can fund and operate redundancy |
Self-hosting is financially attractive only when: avoided API cost > GPU capacity + platform + operations + engineering + risk-adjusted transition cost. Treat this as a decision rule, not a guaranteed result — recalculate when traffic, model quality, GPU prices, provider rates, or reliability requirements change.
A hybrid design can combine the benefits of both approaches:
This approach can reduce the risk of paying for a large idle GPU fleet while preserving a fallback path during traffic spikes or model upgrades, and lets a team validate demand before making a fixed infrastructure commitment.
Before changing models or deployment architecture:
There is no universal cost winner between proprietary APIs and self-hosted open-weight models. APIs often offer the simplest and lowest-risk option for early-stage, low-volume, unpredictable, or rapidly changing workloads. Self-hosted inference may become economically attractive when demand is sustained, utilization is high, the model meets the quality bar, and the organization can support the operational requirements.
Self-hosting may reduce inference cost compared with premium proprietary APIs under favorable utilization and throughput assumptions, but the advantage can disappear when GPUs are idle, redundancy is required, operations are included, or a lower-cost hosted API is available. A credible TCO analysis should begin with an observed workload trace rather than a pricing-page comparison — model the request mix, token distribution, tool behavior, throughput, latency target, availability requirement, GPU price, utilization, engineering allocation, and quality threshold, then compare proprietary API, hosted open-model, managed dedicated, and self-hosted options on the same basis.
No. It may be cheaper at high and predictable utilization, but idle capacity, redundancy, platform services, and engineering labor can make it more expensive than an API for low or irregular demand.
Usually request volume, input/output ratio, traffic distribution, useful throughput, and GPU utilization. Agentic workflows also require tool-call, repeated-context, and retry measurements.
No. Open-weight generally means trained parameters are available for download. Open-source AI involves additional requirements concerning rights, code, parameters, data information, and licensing — check the OSI definition and the model’s own license before using it commercially.
Usually not. It may reduce the price of eligible repeated input, but output, uncached input, cache writes, cache storage, and the actual cache-hit rate still affect the total request cost.
Replay representative traces and count every model turn, input token, output token, tool schema, tool argument, tool result, retry, and repeated context. A workload-specific trace is more reliable than a universal multiplier.
Usually not, unless there’s already a strong reason such as data isolation, predictable high demand, or an established inference platform team. For many new workloads, starting with an API and collecting production traces reduces the risk of overbuilding.
A quarterly review is reasonable for many teams, with additional reviews after major traffic, model, architecture, or pricing changes.
Category:
Discover how AI turns CAD files, ERP data, and planning exports into structured knowledge graphs-ready for queries in engineering and digital twin operations.