All articles
Guide
Implementation, cost and ROI7 min

Open-weight models or a commercial API: which one your business should run on, and when self-hosting pays off

Sooner or later, someone in the room says it: "Let's take an open model and run it on our own server — no per-request fees, and our data never leaves the building." Sometimes that's exactly right. More often it ends with a rented GPU idling all night, a single engineer the whole system depends on, and replies in a second language that customers have to read twice. This article separates the options properly, gives you six criteria that actually decide the choice, shows how to model break-even with your own numbers, and explains why most companies end up with "both, for different jobs".

It's three options, not two

The "open model vs API" debate usually blends two separate questions: whose model is it and where does it run. Pull them apart and you get three real paths.

  • A closed model through the developer's API. Claude, GPT, Gemini. You never see the weights; you send requests and pay by volume of text (tokens). Infrastructure, upgrades and scaling are the provider's problem.
  • An open-weight model through a hosting provider's API. Llama, Qwen, Mistral, Gemma, gpt-oss and similar models, already deployed by someone else and sold by the request. Just as easy to use as the first option, usually cheaper per call — but your data still goes to a third party.
  • An open-weight model on your own hardware. Your own GPU machine or one rented in the cloud, with you running the model. Data stays inside your perimeter; so does everything else — load, updates, monitoring, outages.

Half the arguments for "open models" only apply to the third path, and half the arguments for APIs apply to the first two. Agree on which option you're actually discussing before you argue.

Six criteria that decide it

1. What data the model will see

An agent answering questions about opening hours and services handles nothing sensitive. One that reads medical records, passport details or internal financials makes hosting location the main question. Data residency rules vary — some jurisdictions, Uzbekistan among them, require citizens' personal data to be stored on servers inside the country, and regulated sectors in the UK and the Gulf have their own requirements. We cover the practical side in where your data actually lives when you connect AI. One catch: self-hosting only helps if the server itself sits in the right place. A GPU rented in another region is no better for residency than an API.

2. How hard the task is

Classifying incoming requests, extracting fields from forms, short templated replies — mid-sized open models handle these well. Multi-step reasoning, long contracts, agents that decide on their own which tool to call — here the leading closed models are still noticeably more reliable. The gap is narrowing, but on complex scenarios it shows up on day one of testing.

3. What language your customers write in

English is strong almost everywhere. Arabic, Russian, Uzbek and other languages are uneven, and smaller open models are more likely to mix scripts, drift between languages or produce unnatural phrasing. Our piece on AI in the Uzbek language shows how this plays out for one lower-resource language. Don't choose from leaderboards — run 50–100 real customer conversations through each candidate.

4. Volume and load shape

An API charges per request: low traffic, low bill. Your own server costs the same at 3 a.m. as at Monday's peak. Self-hosting wins on large, steady throughput — batch processing thousands of documents, round-the-clock classification. With spiky traffic (busy days, silent nights), pay-per-request almost always comes out ahead.

5. Who keeps it running

A self-hosted model isn't an install, it's a service: deployment, GPU utilisation, upgrading when a better version ships, working out why responses got slower. Without a named person who can do this and owns it, your own server becomes a single point of failure.

6. How much you need things to stay the same

API providers update and retire model versions, and your agent's behaviour can shift slightly as a result. A self-hosted open model stays frozen at the version you chose until you decide to move. For processes that need reproducibility — classifying documents the same way year after year — that's a genuine argument.

Decision table: which path usually fits

TaskUsually fitsWhyWhat stays with a person
Customer replies on WhatsApp, Telegram or InstagramClosed model via APILanguage and tone quality matter more than per-request cost; traffic is spikyDiscounts, complaints, edge cases
Classifying and routing inbound requestsOpen model (hosted or self-hosted)Narrow task, easy to measure, high volumeDisputed items, revising categories
Extracting fields from documents with personal dataOpen model on a server in the required jurisdictionData must not reach a third partySpot checks, fixing extraction errors
Contract and long-document analysisClosed model via API, with redactionNeeds reliable reasoning over long textThe legal decision and signature
A two-to-three-week pilotAPI, nearly alwaysBuilding servers to test a hypothesis adds time and costJudging the pilot results

Modelling break-even for self-hosting

No prices here — API rates and GPU rental both change every few months. The logic doesn't. Plug in your own figures.

  1. Volume: requests per month × average tokens per request (question, retrieved context and answer). Context is usually several times larger than the question itself.
  2. Monthly API cost = token volume × the provider's current published rate.
  3. Monthly self-hosting cost = machine rental or depreciation + power and space if on-premises + engineer hours × their rate + a buffer for downtime.
  4. Adjust for quality: if the open model fails more often, each conversation handed to a human costs that person's time.

The engineer line usually outweighs everything else. If the server needs even a few hours of attention a week, at modest volume it never pays back, however cheap the GPU looks.

Hybrid: how teams combine them

You don't have to pick one option for the whole company. A common setup routes by task: simple, high-volume calls go to an open model; complex dialogue and reasoning go to a closed model via API. Before anything reaches an external API, names, phone numbers and document IDs are swapped for placeholders and restored after the response.

Build one layer through which the agent talks to any model from the start. Then switching models is a configuration change, not a rewrite — which also protects you if a provider's pricing or terms change. If you haven't yet settled the bigger question of building in-house, buying a SaaS tool or hiring a contractor, start with our guide to the three implementation paths. More on rollout in the implementation section.

FAQ

Can we start on an API and move to our own model later?

Yes, and that's the sensible order. The only condition: don't tie the agent's logic to one provider's quirks, and keep a set of test conversations. Migration then means rerunning the tests on the new model and comparing results blind.

Do API providers train on our data?

Major providers' business APIs generally don't use customer data for training by default, but terms differ and change. Read your chosen provider's current terms and data-retention policy rather than second-hand summaries.

Is "open weights" the same as free for commercial use?

Not always. Some models ship under standard licences such as Apache 2.0; others use custom licences with their own conditions. Check the model card and licence text for the exact model before you deploy.

What does moving to self-hosting cost?

It depends on volume, data requirements and whether you have an engineer in-house. We work that out with your numbers in a first conversation. See how we design agents on the AI agents page, or get in touch.

Subscribe to AI Insights

Case studies, tips and AI automation trends — weekly

Want similar results?

Get a free consultation and ROI calculation for your company

Free Consultation

Related Articles

Guide

Customer Consent to Data Processing When an AI Agent Is the One Replying

The customer is messaging a bot, not a person — but the requirement to get consent for data processing does not disappear. Here is when to ask for it, how to set it up across channels, and what to log.

Guide

AI on your own server: when you genuinely need it, and when it only feels that way

"It's safer" isn't an answer. We separate the checkable reasons for self-hosting AI from the outdated fear driving most of these decisions.

Guide

The system prompt behind your AI agent: what it is and who should write it

A system prompt isn't a knowledge base or a spec — it's the agent's behaviour rules: tone, decision limits, escalation triggers. Here's what goes into one and who should own it.

Guide

Support after launch: what happens to your AI agent a month in

Launch isn't the finish line — it's the start of a different job. Here's what usually happens to an agent in its first month: where it starts drifting, who should notice, and what a weekly review should look like.

Guide

After the pilot: how to scale your AI agent to other departments without repeating the same mistakes

A successful pilot in one department doesn't mean the rest of the company is ready for the same agent. How to choose the next department and what to re-check each time.

Guide

Testing an AI agent before launch: the scenarios to run so your first customers don't become your testers

Which conversations to run through your agent before a real customer sees it — routine questions, grey zones, provocations, integration failures and human handoff, with a test case template.

Open-weight models vs API: what a business should pick | UNIKA