Build vs Buy

The API Tax: How to Distill Frontier Models for Enterprise

Renting frontier AI means paying per token forever with nothing to show for it. Distilling that model's outputs into a smaller, owned one is now a documented enterprise workflow, and it cuts inference costs 75 to 98 percent. Here's how the pipeline works, and where it breaks.

At a glance
  1. 01Distilling frontier models to smaller, owned models cuts enterprise inference costs by up to 98 percent.
  2. 02Foundation model APIs account for $12.5 billion in 2025, the single largest line item in the AI stack.
  3. 03Self-hosting distilled models only wins economically when GPU demand variance stays below 0.4.
  4. 04Distillation narrows a model's scope, requiring paired frontier models for edge cases and reasoning.
A large intricately faceted sphere feeds tokens through a narrowing funnel into a much smaller, simpler sphere, illustrating a frontier model being distilled into a compact one.
Illustration generated by Remy for this story.

Distilling a frontier model for enterprise use means routing your own production traffic through a large teacher model, logging its outputs as training data, and fine-tuning a smaller student model to reproduce that behavior at a fraction of the cost. AWS, NVIDIA, and TensorZero all ship documented pipelines for exactly this now. It's a procurement decision, not a research trick, and the cost deltas are large enough to change how a finance team should think about the AI line item.

The API Tax: What Renting Frontier Models Actually Costs

Enterprise generative AI spend tripled from $11.5 billion in 2024 to $37 billion in 2025.1 Foundation model APIs alone account for $12.5 billion of that, the single largest line item in the entire AI stack.1 That's not a one-time setup cost. It's a per-token tax that scales with usage and never converts into anything the company owns.

Figure 1
Enterprise Generative AI Spend, 2024–2025
enterprise generative AI spend (USD)
$11.502024$37.002025
Year
Figures in billions of US dollars.

Compare that to a niche SaaS subscription, which at least buys a static feature set. A frontier API bill buys inference on someone else's weights, priced by someone else's roadmap. Every dollar spent renting intelligence is a dollar that never becomes a balance-sheet asset. That's the core of the API tax: it looks like infrastructure spend, but it behaves like a subscription with no cap and no equity.

Figure 2
Foundation Model APIs' Share of 2025 Enterprise AI Spend
34%Foundation Model APIs
Foundation Model APIs34%
Other AI Stack Spend66%
Other AI stack spend equals the $37B total for 2025 minus $12.5B in foundation model API spend.

Switching costs are rising, too, not falling. a16z's 2025 CIO survey found enterprise leaders expect roughly 75% growth in LLM spend over the next year. Innovation budgets, which covered a quarter of LLM spending a year earlier, have shrunk to just 7% as this spend gets baked into core operating budgets.2 The same survey found agentic workflows need prompts and guardrails tuned to one specific model, which makes migrating off that model harder even without a contract locking you in.2

What Is Model Distillation?

Model distillation transfers the knowledge of a large "teacher" model into a smaller "student" model.3 Instead of training the student from scratch, you let it imitate the teacher's outputs on your actual task, a far easier problem than general-purpose reasoning.

The standard enterprise pipeline has three steps:

Figure 3
a16z 2025 CIO Survey: LLM Spend Trajectory
75%
Expected LLM spend growth over the next year
7%
Innovation budget's share of LLM spend today, down from 25% a year earlier
  1. Collect. Route a sample of real production requests, or synthetic prompts representative of your workload, through the frontier teacher model and log its responses.3
  2. Curate. Filter and score those outputs so the training set reflects only high-quality, correct responses, not noise. TensorZero's research found that this curation step, not just data volume, determines whether the student can match or beat the teacher.4
  3. Fine-tune. Train an open-weight student model, typically 10 to 100x smaller, on the curated teacher outputs until it reproduces the teacher's behavior on the target task.3

Managed versions of this pipeline now exist inside the major clouds. That's why distillation moved from research paper to procurement decision in about two years.

Renting Frontier APIs vs. Distilling to Owned Open Models

The two approaches diverge on every axis that matters to a CFO or a platform team, not just price.

  • Cost per token. Renting a frontier model means paying the provider's blended rate indefinitely. Distilled models deployed through Amazon Bedrock run up to 75% cheaper than their teacher models.5 NVIDIA's flywheel work pushed that further, cutting inference cost by roughly 98% for a specific tool-calling task.6
  • Latency. Smaller models are faster by construction. Bedrock's distilled models run up to 500% faster than the teachers they were trained from.5
  • Ownership of weights. A rented API gives you zero claim on the model. A distilled open-weight model is yours to hold, version, and deploy anywhere, the same argument this publication has made about owning quantized models instead of renting tokens.
  • Customization. Frontier APIs offer prompt engineering and light fine-tuning. Distillation lets you shape the student's entire behavior around your task, at the cost of narrowing what it can do outside that task.
  • Vendor lock-in. Renting ties your workflows to one provider's model version and pricing. Owning the weights breaks that dependency, though it introduces a new one on your own MLOps capacity.
  • Total cost of ownership. Rented APIs have near-zero upfront cost and unbounded variable cost. Distillation has real upfront cost, engineering time, teacher API calls during data collection, GPU provisioning, but a much lower marginal cost per token afterward, converting an opex stream into something closer to a depreciable asset.7
Figure 4
Amazon Bedrock Model Distillation Gains
75%
Maximum cost reduction vs. the teacher model
500%
Maximum speed increase vs. the teacher model
Source: AWS

The Evidence: Real Cost and Performance Deltas from Production Distillation

These numbers aren't marketing claims from a single vendor. They repeat across independent teams running distillation in production.

  • NVIDIA. The Data Flywheel Blueprint fine-tuned a Llama-3.2-1B model on outputs from a Llama-3.3-70B teacher for an agentic tool-calling task. The 1B model hit 98% of the teacher's accuracy while needing one GPU instead of two.6 One team applying this pattern reported their monthly agent bill drop from $4,200 to $84 after distillation, with evaluation scores within 2% of the original.8
  • TensorZero. Fine-tuning small models on programmatically curated teacher outputs cut inference costs by 5 to 30x and inference time by up to 4x, while matching or beating the teacher on tasks like named entity recognition, agentic RAG, and tool use.4
  • Hebbia. An internal test fine-tuning Qwen3 14B and 32B models for span extraction matched current frontier-model quality with roughly a 43x reduction in parameter count.9 That's the clearest evidence yet that quality parity at a fraction of the model size is achievable outside a vendor's marketing deck, using open-weight models most teams can already run, an argument laid out in more depth in the real break-even math for local models versus APIs.

Where Distillation Falls Short

Distillation isn't a free lunch, and the honest counterweight matters as much as the upside.

Figure 5
NVIDIA Data Flywheel Blueprint: 1B Student vs. 70B Teacher
98%
Teacher accuracy retained by the 1B-parameter student model
50%
Reduction in GPUs needed for inference (2 to 1)

Hebbia's own research found that matching quality is the easy part. Serving a self-hosted distilled model cost-effectively is a separate, harder problem, because GPU fleets have to be provisioned for peak demand, not average demand.9 Their finding: self-hosting only wins economically when demand variance stays below a coefficient of roughly 0.3 to 0.4. Above that threshold, API demand pooling across a provider's whole customer base is structurally cheaper than running your own idle-heavy GPU fleet.9

Snorkel AI raises a second limit: distillation narrows the student model's scope on purpose. A model distilled for one task will "forget" the general capabilities of its teacher, and it will underperform badly if pushed outside the training target.10 Distillation isn't a way to build a smaller version of a general-purpose frontier model. It's a way to build a highly efficient specialist.

That means most production systems still need both: a frontier model handling open-ended reasoning and rare edge cases, and a distilled model handling the narrow, repetitive, high-volume work.10

Figure 6
Production Agent Cost Before and After Distillation
$4,200/mo
Monthly agent bill before distillation
$84/mo
Monthly agent bill after distillation
Source: Chanl Blog

Is It Legal to Distill a Frontier Model's Outputs?

This is where enterprise teams need to slow down before writing a data pipeline. OpenAI's terms of use explicitly prohibit using API output to "develop models that compete with OpenAI."11 That single clause is the boundary between legitimate enterprise distillation and a contract violation.

The boundary got tested publicly. OpenAI told U.S. lawmakers it has evidence that DeepSeek used distillation to "free-ride" on capabilities developed by OpenAI and other U.S. frontier labs, framing it as a policy and national-security issue rather than a simple contract dispute.12 In February 2026, Anthropic went further, publicly attributing more than 16 million exchanges generated through roughly 24,000 fraudulent accounts to coordinated distillation attacks by DeepSeek, Moonshot AI, and MiniMax, aimed at extracting Claude's agentic reasoning, tool-use, and coding capabilities.13 Moonshot's campaign alone targeted more than 3.4 million exchanges at agentic reasoning and tool use, and MiniMax redirected nearly half its traffic to siphon capability from Claude's newest model the day it launched.14

The line for enterprises is straightforward:

Figure 7
TensorZero: Curated-Data Distillation Gains
30×
Maximum inference cost reduction vs. the teacher model
4×
Maximum inference speedup vs. the teacher model
Source: TensorZero
  • Legitimate distillation uses your own production traffic and logs as the training signal, or a provider's own managed distillation tool, such as Bedrock's, that operates inside the license terms you already agreed to.311
  • Illicit extraction means scraping a competitor's model outputs at scale to build a rival general-purpose model, the exact behavior OpenAI and Anthropic have both flagged publicly.1213

If your distillation project narrows a frontier model's behavior down to your own workflow, using your own traffic, you're inside the lines. If it looks like an attempt to reproduce the teacher's full capability set for resale or competition, it isn't.

Which Tasks Should You Distill, and Which Should Stay on Frontier APIs?

Not every workload is a distillation candidate. The decision comes down to task shape, not company size.

Distill these:

Figure 8
Hebbia: Span-Extraction Distillation and Self-Hosting Economics
43×
Parameter reduction at matched extraction quality
0.4
Maximum demand variance (CV) at which self-hosting still beats API pooling
Source: Hebbia
  • Classification and routing. High-volume, narrow-output tasks with a stable definition of correct.
  • Entity and span extraction. Exactly what Hebbia validated at a 43x parameter reduction with no quality loss.9
  • Function and tool calling. The task NVIDIA's flywheel work and Bedrock's own distillation numbers both target directly.56
  • RAG retrieval and reranking steps. Repetitive, well-specified, and high-volume enough that a 75-98% cost cut compounds fast.56

Keep on frontier APIs:

  • Open-ended reasoning. Tasks without a fixed answer shape.
  • Rare edge cases. Low-volume enough that a distilled model would never see comparable training coverage.
  • Multi-step planning. The orchestration layer that decides what to do next, which Snorkel's research suggests distillation reliably degrades.10

This is the same build-versus-buy logic this publication has applied to open-source infrastructure replacing enterprise SaaS contracts: rent the parts that are genuinely hard and low-volume, own the parts that are repetitive and high-volume enough to pay back the engineering investment.

Figure 9
Renting Frontier APIs vs. Distilling to Owned Open Models
Renting Frontier APIs vs. Distilling to Owned Open Models
Cost per TokenLatencyOwns Model WeightsCustomization DepthVendor Lock-in RiskUpfront Investment
Frontier API (Rent)Open-ended reasoning and rare edge casesHighHighNoLowHighNear-zero upfront, unbounded variable cost
RecommendedDistilled Open Model (Own)High-volume, narrow, well-defined tasks like classification, extraction, and tool callingLowLowYesHighLowReal upfront cost (data collection, GPU provisioning, engineering), lower marginal cost after
Ratings are relative across these two options, not absolute categories. 'High' latency, cost, or lock-in indicate more of that quantity, not a value judgment.
Source: Remy analysis

Software Ownership Is the Real ROI

Palantir CEO Alex Karp has said publicly that frontier AI labs have "completely, irresponsibly oversold" their models while quietly absorbing the proprietary data and competitive advantage of the enterprises paying to use them.15 That's a blunt way of stating what the numbers already show: renting a frontier model at a blended $10 or more per million tokens builds nothing on your balance sheet, no matter how much you spend.7

Distillation flips that. A fine-tuned open-weight model deployed internally converts a recurring opex line into a depreciable asset your company actually owns.7 Token prices keep falling industry-wide, and enterprises keep spending more anyway, the classic Jevons paradox playing out across the whole market. That's exactly why the ownership question matters more now, not less.

None of this argues for abandoning frontier APIs. It argues for treating them as R&D: use the frontier model to generate the training signal, then own the smaller model that runs the actual workload. Platforms like Remy are built around that same shift, treating the software a company runs as an asset to hold rather than a subscription to keep renewing. The API tax is optional. The teacher-student pipeline that gets you out of it is no longer experimental.

Frequently asked
Questions readers ask
What is model distillation in the context of enterprise AI?

It's the process of training a smaller, open-weight 'student' model to reproduce a large frontier 'teacher' model's outputs on a specific task, using the teacher's responses to your own production traffic as training data. The result is a much cheaper, faster model you own outright.

How much can distillation actually save on inference costs?

Documented figures range widely by task and vendor: Amazon Bedrock's managed distillation cuts costs up to 75% with under 2% accuracy loss, and NVIDIA's Data Flywheel Blueprint cut inference cost roughly 98% on a tool-calling task while retaining 98% of teacher accuracy.

Is it legal to distill outputs from a model like GPT or Claude?

It depends on whose traffic you use. Using your own production logs through a provider's licensed API or managed distillation tool, like Bedrock's, is standard practice. Scraping a competitor's outputs at scale to build a rival general-purpose model violates terms of use and is the exact behavior OpenAI and Anthropic have both publicly flagged against DeepSeek, Moonshot, and MiniMax.

What tasks should stay on frontier APIs instead of being distilled?

Open-ended reasoning, rare edge cases, and multi-step planning. Distillation reliably narrows a model's competence to the task it was trained on, so most production systems keep a hybrid setup: frontier model for planning, distilled model for high-volume execution.

Does distillation eliminate the need for GPU infrastructure?

No. It shifts the cost problem rather than removing it. Hebbia's internal research found self-hosting a distilled model is only cheaper than API rental when demand variance stays low; if usage is spiky, a self-hosted GPU fleet provisioned for peak load can erase the savings distillation created.

Sources
  1. 12025: The State of Generative AI in the EnterpriseMenlo Ventures
  2. 2How 100 Enterprise CIOs Are Building and Buying Gen AI in 2025Andreessen Horowitz
  3. 3A guide to Amazon Bedrock Model Distillation (preview)AWS Machine Learning Blog
  4. 4Distillation with Programmatic Data Curation: Smarter LLMs, 5-30x Cheaper InferenceTensorZero
  5. 5Amazon Bedrock Model DistillationAWS
  6. 6Build Efficient AI Agents Through Model Distillation With the NVIDIA Data Flywheel BlueprintNVIDIA Developer Blog
  7. 7Enterprise AI's Rent-to-Own Moment: Why CFOs Are Eyeing Model Ownership Over API Billsai.hiero.dev
  8. 8A 1B Model Just Matched the 70B. Here's How.Chanl Blog
  9. 9The Hidden Economics of LLM InferenceHebbia
  10. 10Why enterprises should embrace LLM distillationSnorkel AI
  11. 11Terms of UseOpenAI
  12. 12OpenAI accuses DeepSeek of "free-riding" on American R&DRest of World
  13. 13Detecting and preventing distillation attacksAnthropic
  14. 14Anthropic accuses Chinese AI labs of mining Claude as US debates AI chip exportsTechCrunch
  15. 15Karp Says Frontier AI Labs Are Stealing Enterprise Value And VCs Are ListeningForbes
Portrait of Dana Whitfield
Dana Whitfield
SaaS Economics
Dana breaks down where software budgets actually go, one line item at a time.
More from Dana Whitfield
© 2026 The Official Remy BlogDrafted by AI authors, reviewed by human editors.