Codestral

CodeUnavailable
by Mistral AIModel ID: codestral

Mistral's code-specialized model. Optimized for code generation, completion, and understanding across 80+ languages.

Status
Unavailable
Context
256,000 tokens
Max. output
8,192 tokens
Input → output
Text → Text
Developer
Mistral AI
Updated
September 23, 2026

Codestral is currently unavailable

You can still read the details on this page. Pick one of the available alternatives below to run a comparable model right away.

Go to alternatives
01

Comparable models

All in this category
02

Playground

Try Codestral

Chat

Currently unavailable

Currently unavailable.

The playground is disabled. You can find comparable models in the same category: Browse alternatives

Try Codestral

Send a message. The answer arrives in full once the model is done (no streaming).

System prompt
Max. answer length (tokens)

This run

No price – currently unavailable.

New here?

10 free credits ($0.10) when you sign up with Google

Usable 24 hours after sign-up, up to 5 runs per day and at most 2 credits per run. Other sign-in methods start without credits.

03

About Codestral

TL;DRAs of September 23, 2026

Codestral is a model by Mistral AI in the Code category. Codestral is currently not available on Railwail. The context window holds 256,000 tokens, and one response can be up to 8,192 tokens long.

Background

About Mistral AI

Founded 2023 · Paris, France

Mistral AI was founded in April 2023 in Paris by Arthur Mensch (CEO, former DeepMind), Guillaume Lample and Timothée Lacroix (both former Meta FAIR co-authors of the LLaMA papers). Mistral has built a frontier-scale European LLM lab with a portfolio mixing fully open-weight releases (Mistral 7B, Mixtral 8x7B, Mixtral 8x22B, Mistral Small) and commercial closed-API models (Mistral Large, Mistral Embed, Mistral Saba). The company has raised over €1B from investors including Andreessen Horowitz, General Catalyst, Lightspeed, Salesforce, Nvidia and Microsoft, with a 2024 valuation around €6B. Codestral was released May 2024 as Mistral's first dedicated code model — a 22B dense transformer trained on 80+ programming languages with native fill-in-the-middle support for IDE integrations. A successor, Codestral 25.01, followed in January 2025.

Visit Mistral AI

Architecture

Decoder-only Transformer for code (Mistral architecture)

Codestral-22B is a 22B dense decoder-only transformer using Mistral's standard architecture: 56 layers, 6,144 hidden size, 48-head grouped-query attention with 8 KV heads, sliding-window attention (4,096-token window), RoPE positional embeddings with theta=1M (for long-context support), SwiGLU activations and RMSNorm. The tokeniser is the Mistral BPE with 32,768 entries plus added fill-in-the-middle special tokens (`[PREFIX]`, `[SUFFIX]`, `[MIDDLE]`). Training combined a standard left-to-right autoregressive objective with FIM training for IDE-grade code completion. The training corpus covers 80+ programming languages drawn from public code repositories, plus natural-language code documentation pairs and instruction data for the chat / explain capability. Released May 2024 under the Mistral AI Non-Production License (MNPL), which permits open-weights research and evaluation but not commercial production use without a separate license or hosted API access.

Parameters
22B (dense)
Context
32,000 tokens

Capabilities

  • 22B dense transformer purpose-built for code
  • Native fill-in-the-middle (FIM) for IDE autocomplete
  • Trained on 80+ programming languages
  • 32K context window
  • Competitive with CodeLlama-34B and DeepSeek-Coder-33B at smaller size
  • Strong on mainstream: Python, JS/TS, Java, C/C++, Go, Rust, Bash, SQL, PHP, Swift
  • Open weights available under MNPL (research only)
  • Best for: IDE code completion, code generation, explanation and refactoring across mainstream languages.

Training & license

Trained on trillions of tokens (exact figure not disclosed) of public code repositories across 80+ programming languages, natural-language code-documentation pairs, and instruction-style code data for chat and explain capabilities. Knowledge cutoff approximately early 2024. Training combined autoregressive and fill-in-the-middle objectives.

License: Mistral AI Non-Production License (MNPL). Open weights for research, evaluation and personal use; commercial production requires Mistral commercial license or hosted API access (la Plateforme, AWS Bedrock, Azure AI Studio).

Safety testing: Mistral publishes a model card for Codestral. Safety focus is on code-specific risks (malware, vulnerability generation) rather than general consumer-chat alignment.

Known limitations

  • MNPL blocks commercial production use of open weights
  • Smaller than successor Codestral 25.01 and below DeepSeek-Coder V2 on top benchmarks
  • 32K context shorter than newer code models (DeepSeek-Coder V2: 128K)
  • Weaker on rare languages and DSLs
  • Not as strong on agentic / repo-level reasoning as longer-context code models
  • No multimodal input (no image-of-code understanding)
04

Pricing

Currently unavailable. There is no price for this model at the moment, so it cannot be run.

05

API

Call Codestral with your Railwail API key. Use this model ID in the request:

Currently unavailable

The model has no verified price or is deactivated; API calls are refused.

06

Specifications

Model ID
codestral
Developer
Mistral AI
Category
Code
Input
Text
Output
Text
Context window
256,000 tokens
Max. output
8,192 tokens
Model size
22B (dense)
License
Mistral AI Non-Production License (MNPL). Open weights for research, evaluation and personal use; commercial production requires Mistral commercial license or hosted API access (la Plateforme, AWS Bedrock, Azure AI Studio).
Catalog entry updated
September 23, 2026

Tags

  • coding
  • fast
  • multilanguage
07

Example prompts

Examples from the Railwail catalog. They were not generated live on this page.
  • TypeScript API Handler

    Write a type-safe Express middleware for JWT authentication in TypeScript
    Show example answer

    import { Request, Response, NextFunction } from 'express'; import jwt from 'jsonwebtoken'; interface JwtPayload { userId: string; email: string; role: 'admin' | 'user'; } declare global { namespace Express { interface Request { user?: JwtPayload; } } } export const authenticate = ( req: Request, res: Response, next: NextFunction ): void => { const token = req.headers.authorization?.split(' ')[1]; if (!token) { res.status(401).json({ error: 'No token provided' }); return; } try { const decoded = jwt.verify( token, process.env.JWT_SECRET! ) as JwtPayload; req.user = decoded; next(); } catch (err) { res.status(403).json({ error: 'Invalid or expired token' }); } };

  • Rust Error Handling

    Write a Rust function that reads a JSON config file and returns a parsed struct with proper error handling
    Show example answer

    use serde::Deserialize; use std::fs; use std::path::Path; use thiserror::Error; #[derive(Debug, Deserialize)] pub struct AppConfig { pub host: String, pub port: u16, pub database_url: String, pub max_connections: Option<u32>, } #[derive(Error, Debug)] pub enum ConfigError { #[error("Failed to read config file: {0}")] IoError(#[from] std::io::Error), #[error("Failed to parse config JSON: {0}")] ParseError(#[from] serde_json::Error), #[error("Config file not found: {0}")] NotFound(String), } pub fn load_config(path: &str) -> Result<AppConfig, ConfigError> { if !Path::new(path).exists() { return Err(ConfigError::NotFound(path.to_string())); } let contents = fs::read_to_string(path)?; let config: AppConfig = serde_json::from_str(&contents)?; Ok(config) } // Usage: // let config = load_config("config.json")?;

08

Use cases

What it is used for

  • IDE code completion (continue.dev, JetBrains)
  • Code generation and refactoring
  • Code explanation and review
  • Cross-language code translation
  • Self-hosted developer assistants (research)
  • Production deployments via Mistral hosted API
09

Frequently asked questions

What is Codestral?

Codestral is a model by Mistral AI in the Code category. It is listed on Railwail but cannot be run at the moment.

How much does Codestral cost on Railwail?

Codestral cannot be run on Railwail at the moment, so there is no current price. Available alternatives with prices are listed further down this page.

What is the context window of Codestral?

The context window of Codestral holds 256,000 tokens. One response can be up to 8,192 tokens long.

How fast is Codestral?

There are not enough measured runs of Codestral on Railwail yet to state a run time. It depends on the input, the settings and the load at the provider.

Is Codestral better than Code Llama 13B Instruct?

That depends on the task. Codestral (Mistral AI) and Code Llama 13B Instruct (Meta) are both models in the Code category. The comparison page shows their prices and specifications side by side.

Compare Codestral and Code Llama 13B Instruct

Can I use Codestral right now?

Currently unavailable. The page stays online; available alternatives from the same category are listed further down.

All models through one API

One API key for every model on Railwail. Usage is charged from prepaid credits, 1 credit = $0.01.