Skip to main content
nexeai
All articles

Open source AI: really cheaper than an API?

Nicolas11 min read
Open source AI: really cheaper than an API?

An open model, a GPU server, and the arithmetic looks simple: a few hundred euros a month instead of API bills that keep climbing. On paper, self-hosting almost always wins. In practice, the comparison often pits a small model installed on a modest machine against a large model billed per token, and it leaves out three lines of the budget: the licence, the engineering, the operations. Here is the calculation, built on prices published by the vendors, and the cases where open source remains the right call anyway.

Key Takeaways

  • A rented GPU at a European host costs 0.79 € per hour, about 575 € a month running continuously, excluding tax, according to Scaleway's price list.
  • An API bills per million tokens: at Mistral, the Large model is 0.5 $ for input and 1.5 $ for output, batch processing halves the bill and caching cuts input cost by up to 90 %.
  • At those prices, you need roughly 396,000 requests a month for the rented server to come out cheaper than the API, and the comparison then involves two models of different sizes.
  • Open weights are not always free for commercial use: Mistral limits Apache 2.0 to research and individual use, production deployment requires a licence.
  • Self-hosting is justified first by confidentiality, latency or very stable load, rarely by price alone.

Open source, open model, self-hosted: three different things

The confusion starts with the words. An agent built on LangGraph or an equivalent framework has code you can read, modify and install wherever you like. But that code runs nothing on its own: it needs a language model, and the model is what generates the spend. If you doubt it, compare the price of a framework, which is zero euros, with the monthly bill from a model provider.

"Open model" means the weights can be downloaded. It does not mean the licence allows any use. Mistral states it plainly on its pricing page: open-weight models such as Mistral 7B are Apache 2.0 licensed for research and individual use, while commercial deployment requires a Mistral licence with separate terms for derivatives and production use. In other words, the download is free, running it in a business may not be.

Finally, "self-hosted" describes a mode of operation, not software. You can run an open model on a server rented by the hour, on a machine bought for your own server room, or in a private cloud. Three situations, three cost structures.

The framework landscape is covered in our comparison of open source solutions. Here the question is narrower: from what volume does paying for a machine instead of tokens make sense?

What an API call really costs

An API provider bills two separate flows: the tokens you send (the prompt, the history, the documents) and the tokens the model produces. Rates are published per million tokens, which makes the arithmetic possible without a quote.

On Mistral's pricing page, consulted on 24 November 2026, the Large model is listed at 0.5 $ per million input tokens and 1.5 $ per million output tokens. The same page states that batch processing, for high-volume work, reduces the price by 50 %, and that cached input tokens cut input cost by up to 90 % for repeated prompts. Three levers, then, before you even change model: batching, caching, prompt length.

This billing model has a decisive property for a small business: cost follows usage. A quiet month costs almost nothing. A month with a trade show and three times as many requests costs three times as much, with no negotiation and no machine to provision. The trade-off is the reverse: you control neither the price list, nor model changes, nor the lifespan of the version you call.

What a GPU server really costs

On the other side, a machine. Scaleway's price list, consulted on 24 November 2026, shows the L4-1-24G instance, with one GPU, eight vCPUs and 48 GB of memory, at 0.79 € per hour, about 574.87 € per month, excluding tax, in the Paris region. A two-GPU instance logically doubles the bill.

Three remarks on that figure. First, it runs seven days a week, twenty-four hours a day: a machine receiving no requests costs exactly the same as a saturated one. Second, the available memory is the GPU's, 24 GB here, and it has to hold the model, which caps the size of what you can serve. Third, the price of the machine is not the price of the service: you still have to install the inference engine, tune quantisation, monitor latency, plan restarts.

A GPU server is therefore not a "cheaper equivalent" of an API. It is infrastructure, with the skills and on-call duty that implies. The full cost of an agent in production, item by item, is broken down in our analysis of real production costs.

The calculation that settles it

Let us take an explicit working assumption: a typical request sends 2,000 tokens and receives 300. That is a common order of magnitude for a quote request or a document answer, not a universal average.

Cost of one request through the API, on Mistral's Large model:

  • input: 2,000 tokens at 0.5 $ per million, that is 0.001 $;
  • output: 300 tokens at 1.5 $ per million, that is 0.00045 $;
  • total: 0.00145 $ per request.

The L4 server costs about 575 € a month. Taking 1 € as equal to 1 $ for the order of magnitude, those 575 € therefore buy roughly 396,000 monthly requests, about 13,200 per day. With batch processing at half price, the threshold rises to about 793,000 requests a month.

That threshold is not a break-even point, it is a floor. It compares the price of a bare machine with the price of tokens, without counting engineering, operations, or the fact that the model served on a 24 GB GPU is not the one whose rate appears above.

Criterion API call Rented GPU
Cost when nobody uses it close to zero about 575 € a month
Marginal cost per request 0.00145 $ negligible within capacity
Time to get started a few hours several weeks
Skills required development development and infrastructure
Model available the provider's latest whatever fits in GPU memory
Where the data sits at the provider with you
Changing model one parameter a new deployment

The three lines the comparison forgets

The licence. An open-weight model is not automatically usable in production. The Apache 2.0 licence cited by Mistral covers research and individual use; commercial deployment falls under a separate contract. That cost may be modest, it is never zero, and it belongs in the table before the decision.

Engineering. Running a model in a demo takes an afternoon. Serving it to fifty people every day, with stable response times, a queue, logs and an update procedure, takes recurring work. That work does not appear in the GPU price list, and it does not disappear when volume drops.

Operations. A GPU fails, a driver regresses, a model version is retired. With an API, the incident belongs to the provider and you switch version through configuration. With self-hosting, the incident belongs to you, at three in the morning, while the customer service team waits for answers.

There is a fourth gap, harder to price: quality. A 7-billion-parameter model installed on a consumer card does not answer like a latest-generation model billed at 1.5 $ per million output tokens. Comparing the two prices without comparing the two results leads to a wrong decision in both directions: an agent that costs a lot for what it produces, or a cheap agent that disappoints its users.

When self-hosting is still the right choice

The calculation above does not condemn open source. It moves the argument.

If your data cannot leave your premises, the price question becomes secondary. A law firm, a healthcare service, a local authority handling named records is not arbitrating between two rates but between two levels of risk. In that case, paying for a machine and a licence is often lighter than abandoning the project.

If your load is high and steady, self-hosting becomes competitive again. Not at the raw threshold calculated above, but beyond it, once the model is properly sized, the team knows how to run it and the volume does not swing. A platform processing tens of thousands of documents a day does not have the same curve as a customer service desk with two seasonal peaks.

If you need a model tuned to your vocabulary, your catalogues or your procedures, self-hosting gives you control over the weights. That still requires training data and the skills to measure the result.

In every other case, which means most small businesses, the API remains the rational starting point: it lets you measure real usage before committing to infrastructure. A first-year budget is in fact better built on usage assumptions than on a hardware quote, as we explain in sizing a first-year AI budget.

How to decide in one meeting

Four questions are usually enough to move past the debate of principle.

  1. What monthly request volume have you actually measured, rather than hoped for? Without that figure, the comparison is an opinion.
  2. Can your data pass through a third-party provider, and under what contractual conditions?
  3. Who will run the machine, with what skills, and what happens during holidays?
  4. What would a change of decision cost in eighteen months, in either direction?

A common mistake is comparing published prices without relating them to a volume. Another is choosing self-hosting to avoid an API bill of a few dozen euros a month, then discovering the machine costs six hundred euros before the first request.

If the subject deserves proper framing, a preliminary audit establishes the volume, the data constraints and the target model before an architecture is chosen. And if you would rather move straight to a use case, our AI agent services cover design, integration and monitoring.

FAQ

Is an open source model really free?

The weights download at no cost, professional use does not. The Apache 2.0 licence Mistral applies to Mistral 7B covers research and individual use; a commercial deployment requires a separate licence. Add the server, the power or the rental, and the engineering time: "free" disappears quickly.

Can a useful model run on a server costing 600 € a month?

Yes, provided you accept the right class of model. A single-GPU instance with 24 GB of memory, billed at 0.79 € per hour at Scaleway, is enough for moderately sized models. It does not replace a latest-generation model served through an API, and that is precisely the trap of price comparison.

From what volume does self-hosting become cost-effective?

With the prices noted here and a request of 2,000 input tokens for 300 output tokens, the raw threshold sits around 396,000 requests a month, about 13,200 per day. That threshold counts neither the licence, nor engineering, nor operations: the real break-even point is higher.

Does the API not end up costing more over three years?

It all depends on volume and model. The API levers, batch processing at half price and input caching up to 90 % cheaper at Mistral, lower the bill without changing architecture. At low volume, the API stays far below the cost of a machine; at high, steady volume, the trend reverses.

Conclusion

The question "open source or API" is rarely asked in those terms in a small business. It is asked like this: how many requests a month, on what data, with which team to run the machine. Once those three answers are written down, the calculation takes ten minutes and the answer becomes obvious, including when it contradicts the initial intuition.

Open source is not a saving, it is a trade-off. It buys control over data and latency with engineering time and a fixed cost. The API buys elasticity and model freshness with dependence on a provider. Both are defensible, provided you do not compare a published price with a full price.

Would you like to run this calculation on your own volume? write to us, we start from your figures rather than a market average.


Share this article

Want to go further?

Let's talk about how AI can apply concretely to your business, in a free first conversation.