codestral-2508Codestral is Mistral's cutting-edge language model for coding, released in late July 2025. It is purpose-built for low-latency, high-frequency developer workflows, excelling at tasks such as fill-in-the-middle (FIM) code completion, code correction, and test generation. Optimized for responsiveness and precision, Codestral is well suited for real-time coding assistance, IDE integration, and automated development pipelines where speed and accuracy are critical.
Select an endpoint and copy a working example for this model.
from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.apertis.ai/v1") response = client.chat.completions.create( model="codestral-2508", messages=[ {"role": "user", "content": "Hello!"} ], max_tokens=1024, temperature=0.7) print(response.choices[0].message.content) # Optional: Enable context compression to reduce token usage# response = client.chat.completions.create(# model="codestral-2508",# messages=[{"role": "user", "content": "Hello!"}],# extra_body={"compression": {"enabled": True, "model": "gpt-4.1-mini"}}# )modelmessagesmax_tokenstemperaturetop_pstreamtoolsreasoning_effortstream_optionsthinkingextra_bodyUse these namespaced identifiers in Cursor IDE to avoid conflicts with built-in models.
See how this model compares to others from the same provider.
Mistral Small 4 is the latest release in the Mistral Small family, unifying capabilities from multiple flagship models into a single system. It integrates strong reasoning (Magistral), multimodal understanding (Pixtral), and agentic coding capabilities (Devstral), enabling a versatile, all-in-one model. Designed to handle complex analysis, software development, and visual tasks within the same workflow, Mistral Small 4 is well suited for integrated agentic applications and end-to-end problem solving across domains.
Mistral Small Creative is an experimental lightweight model focused on creative writing and storytelling. It excels at narrative generation, roleplay, character dialogue, and general instruction-following for conversational agents.
Devstral 2 is Mistral AI's open-source, agentic coding model — a 123B dense transformer with a 256K context window. It can navigate and modify large codebases, coordinate multi-file changes, manage dependencies, and automatically detect and fix errors. Designed for modernization and large engineering tasks, it’s tunable for specific languages or enterprise code and is released under a modified MIT license.
Ministral 3 14B is the largest model in the Ministral 3 lineup, delivering near–frontier performance similar to the larger Mistral Small 3.2 24B. It's a powerful yet efficient language model that also includes vision capabilities.
See how this model compares to others from the same provider.
Ministral 3 14B is the largest model in the Ministral 3 lineup, delivering near–frontier performance similar to the larger Mistral Small 3.2 24B. It's a powerful yet efficient language model that also includes vision capabilities.
Mistral Large 3 2512 is Mistral's most powerful model so far — a sparse MoE system with 41B active (675B total) parameters, released under the Apache 2.0 license.
Devstral 2 is Mistral AI's open-source, agentic coding model — a 123B dense transformer with a 256K context window. It can navigate and modify large codebases, coordinate multi-file changes, manage dependencies, and automatically detect and fix errors. Designed for modernization and large engineering tasks, it’s tunable for specific languages or enterprise code and is released under a modified MIT license.
Mistral Embed is Mistral AI's text embedding model, built for semantic search and RAG workflows. It generates 1024-dimensional vectors that capture meaningful relationships between pieces of text.
Initialized observational baseline with no recorded failures