esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
  • Download ResumeContact
Let’s talk

I’ll build the agent for it.

Hosted API or Open Weights for Enterprise?

Hosted API or your own servers for open weights? The data, cost and upkeep trade-offs for an enterprise, explained simply for your AI interview.

In short

For most enterprises a hosted API is the quicker start. Self-hosting open weights gives control over data, versions and cost at steady high volume, but your own team then runs the servers, the updates and the safety checks.

11 min readIntermediateVery common · estimateFacts checked 26 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

A hosted API is a model a vendor runs for us. We pay per use, and they handle the servers and updates, so it is the fastest start. Open weights mean we run the model ourselves, on servers we control, such as GPU servers we run in our own private cloud network. That gives control over data and versions, but my team then owns the GPUs, the patches and the tests. I choose by the data rules first, then traffic, then who can run it.

What is the choice between a hosted API and open weights, in plain words?

A hosted API (a door your app uses to send requests) is a model that a vendor runs on its own servers. Your app sends a request over the internet and gets an answer back, and you pay for what you use. The vendor looks after the chips, the scaling and the updates.

Open weights means the trained numbers inside a model are published. A company can download them and run the model itself, in its own building or in a cloud account it controls. Then it owns the servers, the updates and the tests.

Think of a hospital deciding whether to send its blood samples to an outside lab or run its own. The outside lab is quick to start and follows its own rules. The hospital's own lab takes staff and equipment, but the hospital sets the schedule and keeps the samples in the building. The hospital group in our worked example faces that same choice for its AI: whose servers see the data?

Key words

Hosted API
A model a vendor runs. You call it over the internet and pay per use.
Open weights
A model whose trained numbers are published, so you can download it and run it under its licence.
Self-hosting
Running the model on servers you control, and taking on the upkeep.
GPU
A chip built to run model maths fast. Large models often need several.
Token
A small piece of text, about a word or part of one, that the model reads and bills by.

Who sees the data, and who sets the model's version?

Start with the data path. With a hosted API, your text goes to the vendor's servers. Since March 2023, OpenAI says data sent to its API is not used to train its models, unless you opt in. Its documentation also lists abuse monitoring logs, which keep records of use so OpenAI can enforce its usage rules. By default those logs can hold prompts and responses, and they are kept for up to 30 days.

Read the contract. How long logs are kept, which regions run the service and who can read the records are set there, and they can differ by vendor and by plan.

A cloud account is a middle option. AWS says the model makers get no access to Bedrock's logs or to customer prompts and completions. You still send your data to AWS's service, so the boundary moves into your cloud contract rather than disappearing.

  • “As of March 1, 2023, data sent to the OpenAI API is not used to train or improve OpenAI models (unless you explicitly opt in to share data with us).”

    OpenAI, on its API data

  • “they don't have access to Amazon Bedrock logs or to customer prompts and completions”

    AWS, on Bedrock data protection

Model version is the other control. A vendor can retire a model on its own calendar. A model in a cloud account follows the cloud platform's own retirement schedule, and that can differ from the vendor's.

Three ways to serve a model

Strict data rules

decide where the model may run

Someone else's servers

Vendor API

vendor runs it and bills per use

Model in your cloud

the cloud runs it under your account

Your own servers

Open weights, self-hosted

your GPUs, and your team runs them

Pick by rules and staff

the rules set the minimum

  1. 1The data rules are checked against the vendor's API first.
  2. 2The same check applies to a model run inside your cloud account.
  3. 3Then the check asks whether your own servers can meet the rules.
  4. 4A vendor API passes only if its data terms meet the rules.
  5. 5A cloud account passes if its region and contract do.
  6. 6Your own servers pass only if your team can run them well.
Three ways to serve a model, sorted by who holds the servers. Strict data rules are checked first, so they narrow the list before cost is even counted. Only the options that pass move to the pick.

Tip

Answer the rules first: whose servers see the data, and who signs off a model change. Cost comes after that.

What does running open weights yourself really cost?

Downloading open weights is the easy part, but running them costs money. A rented GPU server is charged for every hour it runs, busy or idle. Serving software loads the model and answers requests. vLLM, a serving library, describes itself as a "fast and easy-to-use library for LLM inference and serving", and it offers an "OpenAI-compatible API server", so app code can often keep the same request shape.

What you take on when you self-host

Open weights downloaded

under the model's licence

Your team owns

Serving software

loads the model and answers requests

GPU servers

paid by the hour, busy or idle

Quality tests

re-run after every model change

Security patches

you install every update

Working service

only while all four keep running

  1. 1The model files arrive, and your team takes them on.
  2. 2The service works only while all four parts keep running.
Downloading the model is the easy step. Your team then owns the serving software, the GPU servers, the quality tests and the security patches. The service works only while all four keep running.

Hosted services usually charge for each request, so the bill grows with traffic. Self-hosting pays for capacity, so the bill stays flat while the servers can keep up. The cost per answer falls as traffic grows, but only while the servers stay busy.

A regional hospital group (made-up) wants a tool that summarises discharge notes (the summary a doctor writes when a patient goes home) for nurses. It handles about 1,800 notes a day, roughly 5 million tokens of text. These are made-up numbers, and the steps show how the decision runs.

  1. 1

    Check the rule first

    Patient notes may not leave the group's own network. A plain outside API fails that rule, so it is out for this data.

  2. 2

    Size the traffic at peak

    Load peaks on weekday mornings, when nurses clear the overnight admissions. The servers must handle that peak, not the daily average.

  3. 3

    Price both paths honestly

    Two GPU servers inside the group's own network cost the same whether 5 million or 15 million tokens pass through them. Even if the rule allowed an API, the answer would still depend on how busy the servers are and who runs them.

  4. 4

    Name the upkeep

    A small team covers night-time callouts when a server fails, installs the security patches, and runs the quality tests after each model change. If that team does not exist, the option that looks cheap is not cheap.

  5. 5

    Plan every model change

    Before a switch, the team re-runs the notes test set and checks nurse ratings. The old version stays live until the new one passes.

How do licences and model changes shape the choice?

A licence sets what you may do with the weights. OpenAI's release page says gpt-oss is "Available under the flexible Apache 2.0 license". Meta's Llama 4 licence has a size limit: a business whose products or services had more than 700 million monthly active users in the calendar month before the Llama 4 release must ask Meta first.

  • “is greater than 700 million monthly active users in the preceding calendar month, you must request a license from Meta”

    Meta, Llama 4 licence (the 700 million users rule)

  • “Partner-operated platforms, Claude Models on Google Cloud (Google managed) and Amazon Bedrock, set their own retirement schedules”

    Anthropic, on partner platforms

Change control is the other half. Hosted models retire on the vendor's calendar, and Anthropic says requests to retired models fail. With self-hosting you pick the upgrade date, but you also own the old model's security fixes and the tests for the new one.

What does the interviewer want to hear?

A strong answer covers

  • The two axes: who holds the servers, and who holds the data.
  • Data rules first, then traffic, then the team that will run it.
  • The middle option: a managed model service in your own cloud account, such as Bedrock.
  • The cost shape: per use on an API, capacity when you self-host.
  • Licence limits and retirement dates, read before launch.
  • The upkeep you take on: serving, patches and tests after each change.

Common traps

  • Trap"Self-hosting is always cheaper and safer."

    BetterIt depends on traffic, the rules and the team. Idle servers still cost money, and you carry the security fixes.

  • Trap"A no-training promise means the data never leaves."

    BetterTraining is one question. Where the data goes and how long logs are kept are others, and they sit in the contract.

  • Trap"Open weights means free to use."

    BetterThe download can be free, but the licence sets limits, and the servers and staff cost money.

Can you spot the hidden cost?

Spot the hidden cost

A pilot runs on two GPU servers rented by the hour from a cloud provider, and traffic is light most nights. Which cost keeps running?

Quick check

A hospital group's rules say patient notes must stay on its own network. Which option fits that rule first?

Can you answer these from memory?

Flash cards · tap a card to flip it

1 / 6

What will they ask next?

  1. Q025Open-weight vs closed API models: trade-offs?13 min
  2. Q310Hosted fine-tuning API vs self-hosted training?Coming soon
  3. Q332Cold starts and autoscaling?Coming soon
  4. Q334How do you cut cost on a cloud-hosted LLM workload?Coming soon
  5. Q339Why do output tokens cost more?Coming soon

Learn it in depth

Last updated on 26 November 2026

Choosing between a hosted AI API and your own servers?

I design and build AI products and agents, including the system behind them, so I can help you weigh the data rules, cost and upkeep. Book a short call and tell me what you need.