Concepts / Cost Planning for Model Inference

Cost Planning for Model Inference

Using a model API means calling a provider's model, while hosting means running the model on infrastructure you operate or rent. The choice shapes who receives your data and how costs accrue.

  • Programming

Two Routes to Model Output

Imagine a small product team that wants its application to produce text from a language model. The team has two broad routes. It can send requests to a model that someone else operates and pay for each use, or it can take a model and run it on infrastructure it controls or rents. Both routes can produce useful answers. They differ in who sees the data, who decides what the model may be used for, and what the bill looks like over time.

This article focuses on that choice. The practical question is which considerations should drive a team's decision when it picks hosting or an API. The answer depends less on technical convenience than on three questions that are easy to overlook at the start of a project: where the model's knowledge came from, what the license allows, and which parties the data is allowed to reach.

Who Holds the Model and the Data

Definition

Using a model API means calling a provider's model. Hosting means running the model on infrastructure you operate or rent. The choice shapes who receives your data and how costs accrue.

The difference is easiest to see by following a request. With an API, the team's application sends a request to the provider, and the provider's model handles it. The data crosses a boundary of trust the moment it leaves the team's application. With hosting, the request stays on infrastructure the team operates or has rented, and the model runs there. The source puts the central point this way: every request sent to an outside service crosses a boundary of trust.

Your applicationsends the requestProvider APIoutside serviceProvider's modeloperated by the providerInfrastructure youoperate or rentfor example a cloudplatformModel you hostruns on your infrastructuresends requesthandled bysends requestruns
When I call a model API, which systems does my data pass through, and how does that differ from running the model on infrastructure I control?

Read the diagram as two paths from the same starting point. The upper path sends data to a party outside the team, the provider. The lower path keeps the model's execution on infrastructure the team operates or rents. Neither path removes the need for the license and lineage checks covered below, because those checks apply to the model itself, whichever path delivers it.

Gates in the Hosting-Versus-API Decision

A useful way to think about the decision is as a sequence of gates rather than a single preference. Each gate asks a question, and the answer narrows the options before the team reaches the final check.

  • Gate one, data sensitivity: if the data has strict privacy requirements, the team must know which parties are allowed to receive it.
  • Gate two, trust: some organizations will not send data to outside services in general, yet will accept a model running on a large cloud platform they already rely on.
  • Gate three, usage rights: whichever route is chosen, the model must still pass the licensing and lineage checks.
Data needs strictprivacy?gate oneLarge cloudacceptable?gate twoHost on that cloudyesLicense and lineagecheckgate three, every routeThird-party APIdirectlydata not especiallysensitiveSelf-host or otherprovidernoyesnoyesno
Which route does a team take once it asks about data sensitivity and trust, and where does every route end up?

Read the diagram from top to bottom. The team first asks whether its data needs strict privacy protection. If it does, it asks whether a large cloud provider is an acceptable place for that data. A yes leads to hosting on that cloud, and a no pushes the team toward self-hosting or another provider. If the data is not especially sensitive, the team can consider a third-party API directly. Every route converges on the same final step. Whether a model is hosted or called through an API, its license and the origin of its training data still determine whether it may be used at all.

Tracing Restrictions Upstream

Definition

The origin and history of a model's training data is called its data lineage. Knowing the lineage matters because it determines usage rights. A model's own license is only one document in that picture.

If a model was trained on outputs produced by another model, the terms governing that other model can still bind how the new model is used. A restriction does not stop at the model it was attached to. It travels down the chain to every model and deployment built from that material. The tree below follows one such chain, using the case the source describes.

ChatGPT terms ofuseupstream restrictionChatGPT outputscovered by those termsTraining data forModel Xbuilt from the outputsModel Xown license lookspermissiveDownstream modelbuilt from Model XDeploymentblocked if the chain is notpermittedrestricts use offeedstrainsbuildsships as
If a restriction applies to a training dataset or base model, how does that restriction propagate to every model and deployment built from it?
Worked example

Tracing Model X

Model X's own license may allow its outputs to be used to improve other models. Model X was trained on ChatGPT outputs. Can a team safely build a product on Model X?

  1. 1
    Read the model's own license

    The license permits using outputs to improve other models. On its own, this looks permissive.

  2. 2
    Trace the lineage

    Model X's training data came from ChatGPT outputs, so ChatGPT's terms of use also apply to the chain.

  3. 3
    Check the upstream terms

    If those terms do not permit this kind of use, then Model X has violated them.

  4. 4
    Apply the conclusion

    The source concludes that Model X cannot be used, even though its own license reads as permissive.

Result

Model X cannot be used. The upstream restriction blocks it, and so it also blocks any downstream model or deployment built from it.

Licenses That Look Open

A model's license is the set of terms and conditions under which the model can be used. It is tempting to read a license as a complete statement of permissions, but a license may restrict use in ways a quick reading misses. The Model X case shows one such way. A license can permit one activity, such as using outputs to improve other models, while the broader chain of obligations still forbids the use.

The source also describes a related pattern in the open source world. It compares models to the Elastic License, which forbids companies from offering the open source version of Elastic as a hosted service that competes with the Elasticsearch platform. The comparison shows that a license can allow access to source material while still limiting who may commercially offer it. Model licenses can work in a similar spirit. Open or accessible therefore does not automatically mean unrestricted.

Privacy and Trust Boundaries

Data privacy concerns the protection of sensitive information. In the hosting-versus-API decision, the central question is which parties will receive that information. A team's privacy policy therefore often reduces to a list of organizations it is willing to trust with its data.

The source makes a point that may seem surprising at first. Some companies with strict data privacy requirements have said that they usually cannot send data to third-party services, yet they are comfortable sending data to models hosted on GCP, AWS, and Azure. For these organizations, the policy is less about whether an outside party is involved and more about which services they can trust. They trust large cloud providers but do not trust other startups.

Regulation adds another consideration. The source notes that rules are evolving around the world and that requirements for auditable information about models and training data may increase. Commercial models may be able to provide certifications, which can spare a company the effort of producing that evidence itself. A hosting decision and an API decision can therefore differ in how much audit work falls on the team.

Open Source Strategy and Who Pays

Many users want models to be open source because openness means more information and more options. The harder question is what the developer gains. Building a model can require very large investment, so a developer who releases it openly needs some reason to do so. The source offers three possibilities. One is that a wave of companies has formed to offer inference and finetuning services on top of open source models, and many people need those services to use open models. A second, offered as an argument rather than a settled fact, is that a large developer may support open source models to keep its competitors in check. A third is that open source is good for society, and that goodwill may be enough to sustain it.

The same model family can appear on both sides of the choice. The source cites Mistral and Cohere as companies that both release open source models and offer APIs. Once a company's inference service runs on its own models, it may become a competitor to the developer that released them. Open availability and commercial services can coexist, but their interests do not always align.

API cost is the other side of the picture, and it is not uniform. The source observes that the companies hit hardest by per-use API costs are probably not the biggest companies. Large organizations may be important enough to service providers that they can negotiate favorable terms. Smaller companies usually have less bargaining power and feel the full weight of the usage bill. A route that looks reasonable for a large company with negotiating leverage can be a heavy burden for a small team.

FactorCalling a provider's APIHosting on infrastructure you run or rent
Who receives the dataThe provider, a party outside the teamInfrastructure the team operates or rents, which may be a large cloud platform the team already trusts
How costs accruePer-use payments to the provider; the source notes smaller buyers feel this mostCosts tied to the infrastructure the team runs; the source gives no formula for comparing the two
Audit burdenCommercial models may provide certifications, which may reduce the team's own evidence workMore of the auditable evidence about the model may fall on the team
License and lineage checkStill requiredStill required
Model availabilitySome models are reachable only through particular providers at a given timeDepends on whether the model can be obtained and run by the team

Trade-offs in the hosting-versus-API decision, as described in the source

Planning a Team's First Model Choice

Worked example

A Small Team Choosing a Route

A five-person team builds a support tool. Its customer messages contain sensitive personal details. Its leadership accepts large cloud platforms but refuses other third-party services. The team has found an open source model whose license looks permissive, but its training data came from another model's outputs.

  1. 1
    Gate one: privacy

    The messages are sensitive, so the team must know exactly which parties receive them.

  2. 2
    Gate two: trust

    Leadership accepts a large cloud platform but not other third-party services. A hosted model on that cloud fits the trust rule, while a direct third-party API does not.

  3. 3
    Gate three: lineage and license

    Before committing, the team traces the training data back to the upstream model and reads that model's terms, not only the open license.

  4. 4
    Decide

    If the upstream terms forbid this kind of use, the model is unusable whichever route is chosen. The team must pick a different model, not a different host.

Result

The team hosts a model on its trusted cloud only if the lineage check passes. Otherwise, the privacy and trust gates lead nowhere, because the model itself cannot be used.

Mistakes Teams Make When Planning Inference

  • Common mistake

    Treating open source as meaning unrestricted

    What it looks like

    A team sees an open source model and assumes any commercial use is allowed.

    Why it fails

    The source warns that a license may restrict use in ways a quick reading misses, and that open does not automatically mean unrestricted.

    Do this instead

    Read the full license and check whether it limits commercial offerings or particular activities.

  • Common mistake

    Checking only the model's own license

    What it looks like

    Model X's license permits using outputs to improve other models, so the team considers it cleared.

    Why it fails

    Model X was trained on ChatGPT outputs, and ChatGPT's terms of use also apply to the chain. The source concludes Model X cannot be used if those terms forbid this use.

    Do this instead

    Trace the data lineage and check the terms of every upstream model that contributed to the training data.

  • Common mistake

    Assuming hosting removes licensing questions

    Why it fails

    The source states that whether a model is hosted or called through an API, its license and training data origin still determine whether it may be used.

    Do this instead

    Run the license and lineage check on every route before comparing costs.

  • Common mistake

    Assuming API costs are the same for every company

    Why it fails

    The source notes that large organizations may negotiate favorable terms, while smaller companies have less bargaining power and feel the full usage bill.

    Do this instead

    Estimate per-use costs using the team's own realistic bargaining position, not a large company's terms.

  • Common mistake

    Ignoring that some models are reachable only through particular providers at a given time

Predicting Whether Model X Can Be Used

What do you think happens?

Model X's own license permits using its outputs to improve other models, and X was trained on ChatGPT outputs. Before reading the answer, what do you think happens if ChatGPT's terms of use do not permit this kind of use?

  • Model X is usable because its own license is permissive

  • Model X cannot be used, because the upstream terms forbid the chain of use

  • Model X is usable only if the team hosts it itself

Reveal answer
Answer:

Model X cannot be used, because the upstream terms forbid the chain of use.

The source states that X's license can be permissive while X is still unusable. Because the training data came from ChatGPT outputs, ChatGPT's terms also apply. If those terms do not permit this use, X has violated them, and hosting it does not change that.

MEDIUM

A team is deciding between calling a provider's API and hosting a model on a cloud platform it already uses. Its data is sensitive, and its leadership refuses third-party services in general. Work through the three gates in order and state which route the team should consider, and what check it must still complete before committing.

Hints
  • Start with the privacy gate: is the data sensitive enough that the receiving parties matter?
  • Ask whether leadership's trust rule accepts a large cloud platform even though it refuses other third parties.
  • Remember that the license and lineage check applies to every route.

Key Takeaways for Inference Planning

  1. 1
    Calling an API sends data to a provider, while hosting keeps the model's execution on infrastructure you operate or rent. The choice determines who receives your data.
  2. 2
    Data lineage determines usage rights. A model trained on another provider's outputs can be unusable if that provider's terms forbid the use, even when the model's own license looks permissive.
  3. 3
    Open or accessible does not automatically mean unrestricted. Licenses may limit commercial offerings or particular activities.
  4. 4
    Privacy decisions depend on which parties are trusted, and costs of per-use API access weigh more heavily on smaller companies than on large ones with negotiating power.
  5. 5
    Whichever route is chosen, the license and lineage checks still apply, so they belong at the end of every decision path.

At a glance

  • Calling an API sends data to a provider, while hosting keeps the model's execution on infrastructure you operate or rent. The choice determines who receives your data.
  • Data lineage determines usage rights, so an upstream restriction can block a downstream model even when that model's own license looks permissive.
  • Open or accessible does not automatically mean unrestricted, since licenses can limit commercial offerings or particular activities.
  • Privacy trust boundaries, open source strategy, and per-use API costs each pull the hosting-versus-API decision, and the cost burden is not uniform across companies.
  • The license and lineage check applies to every route, so it must be completed before a model is chosen.

Related concepts

More concepts starting with C