Cached Input Discounts: Compare AI Gateway Costs
Compare cached input discounts, gateway fees, model coverage and migration costs to find an AI routing setup that lowers agent spend before you switch.

Cached Input Discounts: What to Check Before Switching AI Gateways
In many agent workflows, you're sending the same instructions and context over and over. Some providers offer cheaper rates for those repeated ("cached") prompt tokens, which can bring the bill down. Still, a headline discount is only part of the story. Your total cost also depends on model pricing, gateway fees, how routing works in practice, and the work required to migrate.
The real question isn't which vendor advertises the biggest percentage off. It's which setup delivers the models you need - and lets you manage your workload - at a lower total cost, without creating extra operational overhead that wipes out the savings. This guide shows a practical way to compare costs, interpret published rate cards, and test compatibility before you commit. It also includes a worked monthly cost comparison, using figures published in September 2026.
Disclosure: TENSORAXIS is the product operated by the source publisher. The comparison below uses public, attributed figures; it is not an independent benchmark or third-party review. Treat vendor rates and product details as time-sensitive, and verify them before making a decision.
Why do cached input discounts matter for agents?
Many agent workloads repeatedly send the same system prompt, tool definitions, policy instructions, and other shared context. The model still processes that content, but some providers can recognize eligible prompt content and reuse it instead of charging the full uncached input rate each time. Published discounts can be up to 50% on cached input, based on a comparison published by llmapi.ai. That's a savings on eligible tokens - not a 50% cut across the whole request or your monthly bill.
This distinction matters because an agent's token mix often looks nothing like a single chat session. A coding agent may resend a long system prompt and repository guidance, while adding only a small amount of new user input. A customer support agent may reuse policy instructions across thousands of interactions. In both cases, repeated input can be a meaningful share of usage. But if your workflow mostly sends unique documents, there may be less to cache.
Model the repeated part, not the headline percentage
First, measure how many input tokens are actually repeated and eligible for caching. Separate repeated input from new input, and keep output separate too. Then check the provider's definition of cached input - eligibility rules, cache lifetime, minimum prefix length, and whether the discount applies to the specific model and endpoint you use.
Those details can change the outcome. If your prompt changes near the beginning, a big shared prefix might not qualify. If the cache expires between requests, you'll get less value for low-volume or irregular workloads. And a lower cached rate doesn't help if the gateway routes you to a model that costs more overall than what you're using today.
A useful quick calculation is:
- Uncached input cost: uncached input tokens × input rate.
- Cached input cost: eligible cached tokens × cached-input rate.
- Output cost: output tokens × output rate.
- Gateway cost: any percentage fee, subscription, or other usage charge.
Use your own request logs when you can. If you can't measure eligibility, treat the discount as something to test, not a guaranteed savings. That keeps you from building a budget around a best-case scenario the workload may never reach.
Published rates are only part of the comparison
TENSORAXIS's published rate card, verified on November 18, 2026, includes examples such as:
- claude-opus-4-8: $0.42 per million input tokens, $2.13 per million output tokens
- gemini-3.5-flash: $0.19 per million input tokens, $1.11 per million output tokens
- gpt-5.6-terra: $1.50 per million input tokens, $2.00 per million output tokens
- domestic glm-5.3 (listed): ¥2.71 input, ¥9.49 output per million tokens
These numbers show why model coverage and token mix matter. A rate card can vary a lot by model and by input versus output. They don't prove that a given model is the best fit for your workload, and they also don't automatically tell you whether cached-input discounts are built into those listed prices. Always check the live rate card and the model's caching terms before comparing gateways.
How do you compare gateway costs fairly?
A gateway can change the economics even when the underlying model looks the same on paper. Some gateways add a percentage to model usage; others charge flat fees. A self-hosted proxy may charge no platform markup, but it still costs engineering and infrastructure time. If you only compare headline token prices, you'll miss the layer that often determines your real bill.
Normalize the price to dollars per million input and output tokens for each model you actually call. Keep cached and uncached input separate wherever the provider publishes both. Then apply your real monthly volume and add the fees. Don't compare one vendor's low-volume tier with another vendor's high-volume tier, and don't assume the same rate applies across all models.
A worked monthly example
The llmapi.ai comparison, priced on September 21, 2026, uses an example workload of 40 million input tokens and 10 million output tokens per month on an open reasoning model. The reported costs are:
| Setup | Reported monthly cost | What the number leaves you to consider |
|---|---|---|
| Direct model endpoint | $78 | Direct provider pricing and the operational work of managing the connection |
| Percentage-based router | About $81.90-$82.29 | The percentage fee added to the model usage |
| Flat-fee control plane | $127 | The flat platform cost in the published scenario |
| Self-hosted proxy | $78, plus operations time | Infrastructure and ongoing maintenance are not priced into the token total |
In this scenario, the percentage router adds about $3.90-$4.29 over the direct endpoint, while the flat-fee option is $49 more. The self-hosted figure matches the direct token cost, but it excludes staff time. Your actual result will depend on model rates, the gateway's fee structure, your usage tier, and your workload's token mix.
Use a consistent cost sheet
For each option, capture the same inputs:
- Model and route: include primary and failover models, not just the default.
- Monthly token mix: input, output, cached input, and uncached input where available.
- Model charges: calculate each token category at its published rate.
- Layer charges: add percentage fees, subscriptions, or other platform costs based on your real usage.
- Operations: estimate setup, monitoring, incident response, and maintenance time.
- Migration: include engineering work and the cost of running two systems during rollout.
Price the failover route using the rate of the model that actually serves the request. A router's low base rate isn't a fair comparison if failures send traffic to a more expensive model. Also include any cost impact from quality differences - if one option needs more retries, longer prompts, or additional steps to complete the same job, that changes the "real" spend.
What should you test before switching gateways?
An OpenAI-compatible API can make migration look smaller than it is. Often, the first change really is updating base_url and api_key. That can make a quick smoke test feel fine. But API compatibility in the abstract isn't the same thing as production compatibility. You'll usually find differences around tool calling, structured output, streaming, and edge-case error handling.
Treat compatibility as a set of behaviors you validate, not a "works on my machine" badge. Run the same representative requests through your current setup and the candidate gateway. Compare response structure, tool-call arguments, latency, errors, and whether the task outcome is actually correct. Returning HTTP 200 while omitting a required field is not a successful migration.
Build a small but representative test suite
Include examples of the work that affects both your bill and your operational risk:
- A short and a long prompt, including the repeated system context used by agents.
- Tool calls with valid arguments, malformed arguments, and multiple tool steps.
- Structured output that must match your application schema.
- Streaming responses, including client disconnects and partial output.
- Embedding requests if your product uses them.
- Rate limits, timeouts, retries, and provider errors.
- A failover event that exercises the alternate model and its response format.
Use the same prompt set and application code where possible. Log token counts by category, cache hits or eligible tokens if exposed, the effective model, latency, and errors. That gives you evidence for both cost and behavior. If the gateway doesn't expose enough information to explain its billing or routing choices, treat that as an operational trade-off - not something you discover after rollout.
Check what changes when the gateway routes requests
A unified endpoint can make it easier to access multiple providers, but routing adds an extra decision layer. Confirm whether you can pin a model, select a route, set fallbacks, and see which upstream served a request. Also check how the gateway handles provider outages - especially whether it silently changes model behavior or pricing.
And don't forget the requirements tied to your data and users. If requests can include personal information, assess the applicable privacy and data-processing obligations (including GDPR where relevant). For regulated or sensitive workloads, confirm where requests are processed, what logs are retained, and what controls you can actually use. A lower token bill doesn't fix a deployment that fails your security or compliance needs.
Finally, estimate migration cost as engineering time, not as a vague afterthought. Include test updates, configuration, deployment, monitoring, and rollback. If the expected monthly saving is small, a multi-week validation period may not pay back. The comparison should be net value over a realistic timeline, not a one-month token estimate.
When does a gateway or self-hosted setup make sense?
There's no universally cheapest architecture. A direct endpoint keeps things simple and can be straightforward when you use one provider, need minimal routing logic, and have the engineering capacity to manage credentials, retries, and provider-specific quirks. A gateway becomes more useful when it reduces the overhead of working with multiple providers, centralizes controls, or gives you a practical way to choose models and handle failover.
Self-hosting can make sense if you need tight control, customization, or you already have infrastructure that justifies running the proxy. But "no platform fee" doesn't mean "free." Someone has to deploy it, patch it, monitor it, handle provider changes, and respond when requests fail. Those costs might be manageable for a mature platform team - and painful for a small team already focused on shipping.
Evaluate the whole operating model
TENSORAXIS describes itself as a unified AI compute and model API gateway, offering one OpenAI-compatible key routing to more than 50 upstream providers and more than 100 billed models. Its Model Plaza lists 44 models across six featured providers. The operator says models marked domestic run on China-compliant nodes, while the same key can cover overseas frontier models for non-sensitive workloads. Listed controls include TLS 1.3, API-key isolation, request audit logs, and a stated 99.9% uptime SLA.
These are vendor-published details, not independently verified performance results. Use them as questions: does the model catalog cover what you need, can you identify the route used, and do the stated controls meet your requirements? Ask how the uptime commitment is defined and what remedies apply. Confirm data handling and regional deployment details for the exact service and workload you plan to use.
A simple way to frame the decision is four checks:
- Economics: does total monthly cost drop once token rates, cached usage, fees, and operational work are included?
- Coverage: are the models and fallback routes you need available at acceptable rates?
- Control: can your team inspect, configure, and audit routing in a way you can actually run day-to-day?
- Switching risk: can you test and roll back without disrupting users or degrading application behavior?
If one option looks cheaper only because it ignores operational work or assumes ideal cache usage, the comparison is incomplete. If a gateway costs a bit more but reduces failure handling pain or makes model changes safer, that can be a rational trade. Just be explicit about the trade - and tie it to a business need, not a claim that one approach is automatically "best."
A practical decision rule
Estimate monthly net savings using observed usage, then compare that against migration and ongoing operational costs. If the savings are meaningful and your compatibility tests pass, run a limited rollout with a defined rollback plan. If the savings depend on a caching rate you haven't measured, instrument first.
If a flat-fee platform costs more than your current direct route, identify the specific capability that earns the premium before signing up.
This matters even more for agents, because model behavior affects downstream work. A route that looks cheaper might cause more tool retries, longer answers, or more human escalations. Track cost per completed task - not just cost per million tokens - especially when gateway or model changes could affect quality. That ties infrastructure spend to what your product actually delivers.
Key takeaways
- A cached-input discount applies to eligible repeated tokens, not automatically to the whole request.
- Compare per-million input, output, and cached-input rates for the models you use, then add gateway fees based on your real volume.
- Include failover pricing, migration effort, and ongoing operations. A self-hosted proxy still has a cost, even without a platform fee.
- Test tool calls, structured output, embeddings, streaming, errors, and routing behavior using real application requests.
- Track cost per completed task as well as token cost, especially when model or route changes could affect retries or quality.
Conclusion
Cached input discounts can noticeably reduce agent costs when you have a large repeated prompt prefix. But you shouldn't switch providers just because of the discount alone. Compare the full fee structure, model coverage, and your deployment model - then test the behaviors your application depends on.
Start with real usage data, calculate cost at your actual volume, and include migration and operations. If the numbers still make sense, run a controlled rollout and measure cost per completed task along with reliability and output quality. That's a much better decision basis than choosing a gateway by its headline rate.