The short answer is no, you cannot legally download the model weights of Codestral and run them on your own infrastructure to develop proprietary commercial software or power a commercial product—unless you have a negotiated commercial contract with Mistral AI.
However, yes, you can legally build proprietary commercial software using Codestral if you access it through Mistral's official paid cloud API (La Plateforme) or authorized cloud hyperscalers.
This distinction catches engineering teams, software architects, and enterprise legal counsel off guard. Because Mistral AI famously championed permissive open-source models like Mistral 7B under Apache 2.0, many developers assume every model released by Mistral shares the same commercial freedom.
Codestral is fundamentally different. It was launched under a proprietary restrictive license: the Mistral AI Non-Production License (MNPL-0.1).
At 365Finds, our commercial research assessment is unambiguous: treating Codestral weights as standard open source is a severe compliance hazard that invites copyright claims, contract termination, and intellectual property contamination in your codebase. Here is the legal breakdown of MNPL-0.1, the boundary between code outputs and model weights, and the exact roadmap to using Codestral legally in enterprise environments.
1. The MNPL-0.1 License Deconstructed: 3 Critical Enterprise Traps
When Mistral AI introduced Codestral (its 22B coding model), it published the model weights on Hugging Face and made them runnable via local tools like Ollama and vLLM. This created an immediate industry misconception: developers equated "open weights" with "open source."
Codestral is not open source according to the Open Source Initiative (OSI). The MNPL-0.1 explicitly restricts commercial use, which violates Point 6 of the Open Source Definition (No Discrimination Against Fields of Endeavor).
Companies evaluating Codestral must navigate three specific legal tripwires in the license text:
Trap 1: The "Local Weights Are Free for Development" Fallacy
Engineers often argue: "We aren't selling the model; our developers are merely using local Codestral instances in Ollama to write our software."
Under MNPL-0.1, this is an explicit license breach. Section 3.2 dictates that the model and any derivatives may only be used for "testing, research, Personal, or evaluation purposes in Non-Production Environments."
The definitions in Section 9 eliminate any commercial loophole:
- "Non-Production Environment": Defined as any setting that "expressly excludes live, real-world conditions, commercial operations, revenue-generating activities, or direct interactions with or impacts on end users (such as, for instance, Your employees or customers)." Furthermore, internal evaluation explicitly excludes "any internal usage by employees in the context of the company’s business activities."
- "Personal": Defined as use that is "not directly or indirectly connected to any commercial activities, business operations, or employment responsibilities." It expressly states that Personal use "does not include any usage by individuals employed in companies in the context of their daily tasks."
If an in-house engineer uses a self-hosted instance of Codestral to complete pull requests, fix bugs, or draft functions for software your company sells or uses in operations, that instance is operating in breach of MNPL-0.1.
Trap 2: Wrapping Self-Hosted Codestral in Internal Services or SaaS
Section 3.2 contains a strict prohibition:
"You shall not supply the Mistral Models or Derivatives in the course of a commercial activity, whether in return for payment or free of charge, in any medium or form, including but not limited to through a hosted or managed service (e.g. SaaS, cloud instances, etc.), or behind a software layer."
If a product team packages Codestral weights inside a Docker container, deploys it to a private Kubernetes cluster, and exposes an internal autocomplete API for the engineering team—or wraps it behind a customer-facing SaaS feature—the company violates the core distribution and usage limitations of MNPL-0.1.
Trap 3: The Binding Employee Clause
Section 1.3 specifies that anyone accepting the license on behalf of an employer warrants that they possess legal authority to bind the entity. When an engineer clicks "agree" on Hugging Face or pulls the model repository under a corporate network identity, they legally bind the corporation to MNPL-0.1.
Under Section 7.2, any material breach allows Mistral AI to terminate the license immediately. Upon termination, the company must permanently delete all copies of the model and derivatives. Section 8.1 and 8.2 assign governing law to France and give exclusive jurisdiction to the courts of Paris.
2. Model Weights vs. Code Outputs: Who Owns What?
A primary concern for software vendors and enterprise legal teams is code ownership: if an engineer generates proprietary code using Codestral, does Mistral AI hold any claim over that code?
The Output Ownership Clause
Under Section 4.2 of MNPL-0.1:
"We claim no ownership rights in and to the Outputs. You are solely responsible for the Outputs You generate and their subsequent uses in accordance with this Agreement."
Mistral AI does not assert copyright or intellectual property rights over the text or source code generated by Codestral.
The Compliance Paradox: Contaminated Pipeline Risk
While Mistral claims no ownership of outputs, the right to generate those outputs requires an active, valid license to run the underlying model.
If an enterprise operates self-hosted Codestral weights without a commercial license:
- The company acts without a valid license, opening exposure to breach of contract and direct copyright infringement regarding the unauthorized execution of the model weights.
- During merger and acquisition (M&A) technical due diligence, venture capital auditing, or SOC 2 / ISO compliance reviews, failure to document a valid commercial license for the AI tools used to construct the codebase raises legal red flags.
- Competitors or counterparties can challenge the provenance of proprietary IP if mission-critical modules were synthesized by an unlawfully operated model instance.
In short: you own the output, but generating that output from unlicensed weight deployment creates unforced corporate liability.
3. The Compliant Paths: How to Use Codestral Legally
Enterprises do not have to abandon Codestral's code generation capabilities. Mistral AI provides two fully authorized, commercial mechanisms, and software architects have clear alternative choices.
HOW TO LEGALLY USE CODESTRAL
│
┌──────────────────────────────────────┴──────────────────────────────────────┐
▼ ▼
Cloud API Access Weight Self-Hosting
(Official & Paid) (Private Infra / On-Prem)
│ │
┌───────┴────────────────────────┐ │
│ La Plateforme (api.mistral.ai) │ │
│ Hyperscalers (Azure / AWS) │ │
└───────┬────────────────────────┘ │
│ │
▼ ▼
100% Legally Authorized Commercial Agreement Required
• Covered by Mistral Commercial Terms • MNPL-0.1 forbids commercial use
• Customer owns all outputs • Must contact license@mistral.ai
• Zero training on customer prompts • Negotiate custom self-deploy license
• Per-token pricing: $0.30 / $0.90 per M • Otherwise use Apache 2.0 models
Path 1: Official Cloud API via La Plateforme or Cloud Hyperscalers
The fastest, most cost-effective, and fully compliant route is accessing Codestral through Mistral’s official commercial API endpoints:
- Direct Endpoints:
api.mistral.ai(standard API) andcodestral.mistral.ai(dedicated endpoint for IDE integrations). - Cloud Hyperscalers: Azure AI Studio, AWS Bedrock, Google Cloud Vertex AI, and Snowflake Cortex.
When you use Codestral via these paid endpoints, your use is governed by the Mistral AI Commercial Terms of Service, not MNPL-0.1. Under Section 3.1 of the Commercial Terms:
- Full Output Ownership: Mistral AI explicitly assigns all right, title, and interest in generated outputs to the customer.
- Commercial Offerings Authorized: Section 1.4 and Section 2.1 grant the customer the right to use outputs in commercial products and customer-facing offerings.
- Data Privacy Protection: Section 4.2 guarantees that Mistral AI does not use customer prompts or outputs to train its models (unless experimental preview labs are explicitly chosen).
- Transparent Pricing: Billed per token on La Plateforme at $0.30 per 1 million input tokens ($0.03 cached) and $0.90 per 1 million output tokens.
Path 2: Mistral Vibe Commercial Subscriptions
Developers using Mistral's unified agent tool, Mistral Vibe, can interact with codebases via terminal CLI, chat, and editor extensions. When teams deploy Mistral Vibe under commercial organization accounts backed by enterprise API credentials, all code synthesis is covered under the Commercial Terms of Service.
Path 3: Enterprise Self-Deployment Commercial Agreement
For organizations with mandatory air-gap requirements, banking regulations, or defense-grade data isolation that prevent cloud API calls, running Codestral on private GPUs is still possible.
To do so lawfully, the enterprise must contact Mistral AI directly (license@mistral.ai) and execute an Order Form for Customer Infrastructure under Section 1.1 of the Commercial Terms. This replaces the MNPL-0.1 restrictions with negotiated on-premises commercial usage rights.
4. Legal & Operational Comparison Matrix
| Deployment Route | Governing Terms | Permitted for Commercial Code? | Can Power SaaS Features? | Zero Training Guarantee? | Typical Cost |
|---|---|---|---|---|---|
| Self-Hosted Weights (HF / Ollama) | MNPL-0.1 | No (Violates Sec 3.2 & Sec 9) | No (Explicitly prohibited) | Local only, but legally invalid | Hardware costs + high legal risk |
La Plateforme API (api.mistral.ai) | Commercial Terms of Service | Yes (Sec 3.1 full assignment) | Yes (Customer Offerings allowed) | Yes (Sec 4.2 default opt-out) | $0.30 / M input; $0.90 / M output |
| Cloud Hyperscalers (Azure / AWS) | Partner-Served Terms | Yes | Yes | Yes (Covered by cloud DPA) | Hyperscaler token rates |
| Custom On-Premises License | Executed Order Form | Yes | Yes (Subject to scope) | Yes (Air-gapped) | Custom enterprise fee |
| Apache 2.0 Alternative (Qwen2.5-Coder) | Apache 2.0 | Yes | Yes | Local only | Compute hardware costs |
5. Enterprise Action Plan: 3 Steps to Secure Your Codebase
If your engineering organization currently uses Codestral, take these three practical steps immediately:
- Audit Internal Repositories and Local GPU Nodes: Check if team members have pulled Codestral weights via
ollama run codestral, vLLM, or Hugging Face Transformers inside your development infrastructure. If discovered, verify whether the generated code was committed to commercial product repositories. - Standardize on Official API Keys: Route all IDE plugins (Continue.dev, Tabnine, or custom agent scripts) through official La Plateforme API keys or enterprise hyperscaler endpoints. At $0.30/$0.90 per million tokens, the API cost of generating an entire commercial application is trivial compared to the cost of legal exposure.
- Establish Clear Dual-Licensing Architecture: If your infrastructure requires self-hosted code models with zero external network connectivity and zero vendor license fees, mandate true Apache 2.0 models (such as Qwen2.5-Coder or StarCoder2). Reserve Codestral for API-driven workflows or negotiate an enterprise on-prem agreement.
6. 365Finds Research Verdict
At 365Finds, our recommendation for enterprise software leaders is clear:
- Stop self-hosting Codestral weights on corporate hardware without an enterprise contract. The definition of "Non-Production Environment" under MNPL-0.1 leaves zero ambiguity: using the weights for employee development on commercial systems is a direct license violation.
- Embrace Codestral through La Plateforme API or cloud hyperscalers. You get state-of-the-art coding performance, an expansive 32k context window, fill-in-the-middle support, complete ownership of all generated code, and enterprise-grade privacy protection—fully backed by Mistral's Commercial Terms of Service.
- When self-hosting without software license fees is non-negotiable, pick Apache 2.0 models instead. Do not conflate "open weights" with open source.