We use cookies to enhance your experience on the site
CodeWorlds
Back to collections
Guide11 min read

Mistral AI, models with no asterisk on the licence

Mistral AI releases models under Apache 2.0 with no extra conditions. Variants, API pricing, self hosting, a 256k token context, and a comparison.

Mistral AI, models with no asterisk on the licence

Mistral is a French company releasing language models with weights, and it does so under Apache 2.0 rather than under a bespoke conditional licence. That difference sounds like a legal detail and can decide the choice when deploying inside a company.

Apache 2.0 is a permissive licence with no extra conditions: commercial use, modification, fine tuning, and deployment are allowed with no scale thresholds, no publisher imposed acceptable use policy, and no attribution obligation on the product. A legal team reads it in a quarter of an hour and has no questions.

Why the licence matters

Weights models split today into two groups that conversation lumps under one word, "open".

The first covers models under permissive licences, where restrictions are practically absent. The second covers models under a publisher's own licence, where commercial use is allowed but conditioned: by a user count threshold, by an acceptable use policy, or by a product attribution requirement.

For most companies that second group is fine too, since the conditions are mild. The problem appears with three kinds of organisation: very large ones, where a scale threshold can bite; those in regulated industries, where every condition must be documented; and those reselling the model onward as part of their own product.

The second aspect is durability. A permissive licence once granted cannot be revoked for weights already downloaded, so the model stays yours whatever the publisher decides later.

Variants and what they are for

The family covers several sizes aimed at different tasks, with the latest generation built on a mixture of experts architecture.

The largest variant carries around six hundred seventy five billion parameters in total, of which around forty one billion work on each token. The context window reaches two hundred fifty six thousand tokens, covering most applications short of analysing whole repositories.

The mid sized variant is a compromise between quality and cost, and it powers the agentic mode in the publisher's chat application. The small variant suits classification, tagging, and bulk processing, where throughput and price decide.

Specialised models are developed separately: for code, for document processing, and for speech. That last category is sometimes an argument in itself, since it lets you build an entire voice pipeline with one vendor or entirely on your own machines.

The mixture of experts architecture carries a consequence worth knowing before buying hardware. The model computes quickly because only part of the parameters work, yet the whole thing must load into memory. The largest variant will not fit on a single card and needs a server class machine or a rental.

Working through the API

The interface follows a popular format, so integration comes down to changing the address and the model name.

Code
Bash
pip install mistralai
export MISTRAL_API_KEY=...
Code
Python
from mistralai import Mistral

client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])

response = client.chat.complete(
    model="mistral-large-latest",
    messages=[{"role": "user", "content": "Classify this ticket: ..."}],
)

print(response.choices[0].message.content)

For tasks needing a predictable response shape, enforce the format rather than parsing text with regular expressions. Tool calling works as with other vendors, so agent libraries such as LangChain support these models with no extra work.

Prices fall into three levels matching model sizes, with the small variant around twenty cents per million input tokens, the mid sized one several times that, and the largest higher still. Rates get adjusted, so check the current price list at source before budgeting for a year.

Price one run across ten real cases rather than relying on the rate sheet. Only then do you see how many tokens your prompts actually consume.

Running it yourself

Since the licence permits it, running the model on your own hardware is a normal path rather than an exception.

Code
Bash
ollama pull mistral-small
ollama run mistral-small

Small and mid sized variants run on hardware you can buy: a computer with around thirty two gigabytes of unified memory or a card with twenty four gigabytes suffices at four bit quantisation. The largest variant needs a server class machine.

More on running models locally sits in the piece on Ollama. A production deployment serving many users needs a server that batches requests, though, since a single user tool will not deliver throughput.

The third route is renting a weights model from a cloud provider. You keep the ability to fine tune and independence from a single company, losing full data privacy.

European languages

This is an area where these models perform better than their size suggests and one of the real reasons to reach for them.

Models trained mainly on English data handle other European languages noticeably worse, which shows in inflection, syntax, and specialist vocabulary. A European publisher has different proportions in its training data and that translates into quality.

It does not excuse you from testing, though. Differences between models depend heavily on domain, so compare two or three variants on your own examples before choosing. Thirty real cases suffice to see which model understands your vocabulary.

Specialised models

Beyond general models the publisher develops several lines aimed at specific tasks, and those are often the reason to look here at all.

The code model is tuned on repositories and performs well at completion and at explaining fragments. In its smaller variant it runs locally on an ordinary laptop, so it can plug into an editor as an assistant whose code never leaves the machine.

The document processing model turns files, scans and PDFs included, into ordered text preserving layout, tables, and reading order. That solves the most tiresome stage of building search over your own documents, where plain text extraction jumbles columns and loses tables.

Speech models cover recognition and synthesis, so an entire voice pipeline can sit with one vendor or run on your own infrastructure. For applications where a call recording cannot leave the company, that is sometimes the only permissible route.

Note that these models do not compete with each other but form parts of one pipeline. Documents pass through the extraction model, land in a vector database such as Qdrant, and a general model generates the answers.

When self hosting comes out cheaper

The arithmetic is simpler than it seems and worth doing before the decision rather than after.

A per token model costs in proportion to traffic, so at a hundred calls a day the bill is small and at a hundred thousand it is serious. A self hosted model costs whatever the machine costs, whether or not it is working.

The break even point usually lands around a few thousand calls a day for medium length tasks, though it depends on the chosen variant and on whether the machine is yours or rented by the hour.

Costs easy to forget belong in the arithmetic: time to deploy and maintain the server, monitoring, updates, and headroom for peaks. In a small team that cost often exceeds the difference in the token bill.

A sensible middle arrangement routes traffic by task type. Classification and tagging go to the self hosted model, being bulk and simple. Hard, rare tasks go to the API, where quality decides and volume is low.

Mistral against the alternatives

ModelStrengthWeaknessPick it when
MistralApache 2.0 licence, European languages, weights availableSmaller tooling ecosystemUnconditional licence required, non English content
LlamaLargest open model ecosystem, long contextBespoke conditional licenceFine tuning, ready tooling and community
ClaudeCode work, long agentic tasksNo weights, per token billingHard tasks where quality decides
GeminiVideo and audio, cheap fast variantsNo weights, frequent naming churnMedia and high volume in the cloud

The first two rows are the usual choice among weights models, and licence or language usually settles it. If you need a permissive licence or work on content outside English, the first row wins. If the count of ready tools, fine tuned variants, and materials matters, the second does. Beyond that pair sits Kimi from Moonshot AI: a mixture of experts model with public weights, a million token context, and closed model level results on coding tasks. The difference is scale and licence. Every parameter has to be loaded into memory, so self hosting means several GPU machines rather than one, and the licence carries extra conditions that trigger on a large consumer product.

Avoid choosing on a table alone, though, this one included. Models change every few months, and the differences in a specific application are sometimes the reverse of general impressions. Thirty real cases run through two models give an answer no comparison replaces, and it takes an afternoon.

Common mistakes

The first is choosing a variant by name rather than by task. Classifying tickets on the largest model overpays several times against a small variant that would do just as well.

The second is buying hardware for the largest model without counting memory. The mixture of experts architecture needs every parameter loaded, so fast generation does not reduce memory requirements.

The third is relying on somebody else's benchmarks when choosing. Public results measure tasks that rarely resemble yours, and rankings outside English can invert those inside it.

The fourth is overlooking fixed cost on a self hosted model. A machine costs the same on a quiet day as at peak, so at modest volume the API often comes out cheaper.

The fifth is treating a permissive licence as no obligations at all. Apache 2.0 requires preserving licence and attribution notices, which matters when distributing the model onward.

The sixth is having no layer separating logic from the vendor. A thin interface with one call shape lets you compare models on your own data, and that is the only meaningful test.

FAQ

Are Mistral models genuinely open?

The main models are released under Apache 2.0, a permissive licence with no extra conditions. That separates them from some competitors, where commercial use is allowed but bounded by a scale threshold or a use policy. Check the licence of the specific variant, since not every model from the publisher is released the same way.

What does the API cost?

Prices fall into three levels by model size, from around twenty cents per million input tokens on the small variant, through several times that on the mid sized one, to the highest rate on the largest. A free tier exists for testing. Rates change, so check the current price list before budgeting.

Mistral or Llama?

Choose Mistral when you need a licence without conditions or work on content in European languages. Choose Llama when the largest tooling ecosystem, ready fine tuned variants, and community material matter. Compare both on your own data.

What hardware does self hosting need?

Small and mid sized variants run on a computer with around thirty two gigabytes of unified memory or a card with twenty four gigabytes at four bit quantisation. The largest variant needs a server class machine, so it is usually rented from a cloud provider.

Can the model be fine tuned to my domain?

Yes, and the licence does not restrict it. Low rank fine tuning fits on a single card for the smaller variants. Before starting, though, check whether a well written instruction with a few examples gets a similar result, since in half the cases it does.

Data sovereignty and regulated deployments

A separate reason European companies reach for this publisher is where data gets processed. A model running on your own infrastructure sends nothing out, and when using the API it matters where the servers physically sit.

In regulated industries that aspect often outweighs model quality. Consent to process personal data outside a chosen region needs documentation that sometimes simply cannot be assembled in reasonable time.

A weights model solves the problem at source, since the question of data transfer stops existing. That is a recurring pattern: a project starts on a cloud model and after the first audit moves the part of the pipeline touching sensitive data onto a self hosted one.

Plan for that split from the start, even if everything goes to the API initially. A thin layer with one call interface lets you redirect selected tasks to a local model without rewriting the application.

Models and licences are described on the publisher's site, the latest generation is announced in the Mistral 3 post, and weights are distributed through Hugging Face.