Devstral 2 is a state-of-the-art open-source model by Mistral AI specializing in agentic coding. It is a 123B-parameter dense transformer model supporting a 256K context window. Devstral 2 supports exploring codebases and orchestrating changes across multiple files while maintaining architecture-level context. It tracks framework dependencies, detects failures, and retries with corrections—solving challenges like bug fixing and modernizing legacy systems. The model can be fine-tuned to prioritize specific languages or optimize for large enterprise codebases. It is available under a modified MIT license.
Context Window
262k tokens
Max Output
66k tokens
Pricing (Input / Output)
$0.00015 / $0.0006 per 1M
Architecture
transformer
Modality
text->text
curl -X POST https://api.neuralhub.xyz/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer NEURALHUB_API_KEY" \
-d '{
"model": "mistralai/devstral-2512",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "" }
],
"temperature": 0.7,
"max_tokens": 500,
"top_p": 0.9
}'The API returns an OpenAI-compatible response. Example:
{
"id": "chatcmpl-<uuid>",
"object": "chat.completion",
"created": 1765590375,
"model": "mistralai/devstral-2512",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The answer to life, the universe, and everything is famously 42..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 26,
"completion_tokens": 169,
"total_tokens": 195
}
}