[Mistral](/ai-gateway/models/labs/mistral)

# Devstral Small 2

Devstral Small 2 is a 24B agentic coding model with 68.0% on SWE-bench Verified, a context window of 256K tokens, and multimodal input support. Devstral Small 2 matches models up to five times its size on coding benchmarks. Your use is subject to Mistral's [Terms](https://mistral.ai/terms) & [Privacy](https://mistral.ai/terms#privacy-policy) Policies.

Tool UseVision (Image)

[Use with AI Gateway](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Futm_source%3Dgateway-model-page%26utm_campaign%3Dai-gateway-models&title=Get+Started+with+Vercel+AI+Gateway) [View docs](https://vercel.com/docs/ai-gateway)

AI SDKChat CompletionsMessagesResponses

```
1import { streamText } from 'ai'
2

3const result = streamText({
4  model: 'mistral/devstral-small-2',
5  prompt: 'Why is the sky blue?'
6})
```

[Read docs](https://vercel.com/docs/ai-gateway/sdks-and-apis/ai-sdk)

[Overview](/ai-gateway/models/devstral-small-2) [API](/ai-gateway/models/devstral-small-2/api) [About](/ai-gateway/models/devstral-small-2/about) [Providers](/ai-gateway/models/devstral-small-2/providers) [Throughput](/ai-gateway/models/devstral-small-2/throughput) [Latency](/ai-gateway/models/devstral-small-2/latency) [Uptime](/ai-gateway/models/devstral-small-2/uptime) [Status](/ai-gateway/models/devstral-small-2/status) [Similar](/ai-gateway/models/devstral-small-2/similar) [FAQ](/ai-gateway/models/devstral-small-2/faq)

## [Copy link to heading](#playground)Playground

Try out Devstral Small 2 by Mistral. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75)Devstral Small 2

![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=96&q=75)

Devstral Small 2

## [Copy link to heading](#providers)Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the [docs](/docs/ai-gateway/provider-options) for more info. Using a provider means you agree to their terms, listed under Legal.

| Provider |
| --- |

| Context | Max Output | Latency | Throughput | Input | Output | Cache | Web Search | Capabilities | ZDR | No Training | Free Tier | Release Date |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |

| ![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75) [Mistral](/ai-gateway/models/providers/mistral) Legal:[Terms](https://mistral.ai/terms)•[Privacy](https://mistral.ai/terms#privacy-policy) | 256K | 256K | 0.4s | 131tps | $0.10/M | $0.30/M |  | — |  |  |  |  | 12/09/2025 |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |

## [Copy link to heading](#throughput)Throughput24 hours

1W

1D

P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the [docs](https://vercel.com/docs/ai-gateway/models-and-providers/metrics) for more info.

## [Copy link to heading](#latency)Latency24 hours

1W

1D

P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the [docs](https://vercel.com/docs/ai-gateway/models-and-providers/metrics) for more info.

## [Copy link to heading](#uptime)Uptime24 hours

1W

1D

1H

Direct request success rate on AI Gateway and per-provider. Visit the [docs](https://vercel.com/docs/ai-gateway/models-and-providers/uptime) for more info.

1W

1D

1H

## [Copy link to heading](#more-models-by-mistral)More models by Mistral

All

Text

Code

Embed

| Model |
| --- |

| Context | Latency | Throughput | Input | Output | Cache | Web Search | Capabilities | Providers | ZDR | No Training | Free Tier | Release Date |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |

| ![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75) [mistral/devstral-2](/ai-gateway/models/devstral-2) | 256K | 0.4s | 134tps | $0.40/M | $2/M |  | — |  | ![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75) |  |  |  | 12/09/2025 |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| ![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75) [mistral/mistral\-large-3](/ai-gateway/models/mistral-large-3) | 256K | 0.7s | 80tps | $0.50/M | $1.50/M |  | — |  | ![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75) |  |  |  | 12/02/2025 |  |
| ![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75) [mistral/ministral-14b](/ai-gateway/models/ministral-14b) | 256K | 0.3s | 112tps | $0.20/M | $0.20/M |  | — |  | ![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75) |  |  |  | 12/02/2025 |  |
| ![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75) [mistral/ministral-3b](/ai-gateway/models/ministral-3b) | 128K | 0.3s | 192tps | $0.10/M | $0.10/M |  | — |  | ![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75) |  |  |  | 10/16/2024 |  |
| ![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75) [mistral/mistral-small](/ai-gateway/models/mistral-small) | 32K | 0.5s | 158tps | $0.10/M | $0.30/M |  | — |  | ![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75) |  |  |  | 09/17/2024 |  |
| ![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75) [mistral/mistral-embed](/ai-gateway/models/mistral-embed) |  |  |  | $0.10/M |  |  | — |  | ![mistral logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fmistral.png&w=48&q=75) |  |  |  | 12/11/2023 |  |

## [Copy link to heading](#about-devstral-small-2)About Devstral Small 2

Devstral Small 2 is Mistral's second-generation compact software engineering agent, introduced alongside Devstral 2 as the smaller tier of the family. At 24B parameters, it scores 68.0% on SWE-bench Verified, matching models up to five times its size.

The key additions over the original Devstral Small are a context window of 256K tokens (enabling full-repository context) and multimodal input support. Agents can now process images alongside code. This makes Devstral Small 2 useful for UI-debugging workflows where you correlate screenshots of broken interfaces with frontend code, or for reading architecture diagrams in documentation.

Devstral Small 2 is released under Apache 2.0.

## [Copy link to heading](#what-to-consider-when-choosing-a-provider)What To Consider When Choosing a Provider

- Configuration: At 24B parameters, Devstral Small 2 reaches comparable SWE-bench performance to models 5x its size.
- Zero Data Retention: Zero Data Retention is available for this model. It is offered on a per-provider and model basis. See the [documentation](https://vercel.com/docs/ai-gateway/security-and-compliance/zdr) for details.
- Authentication: AI Gateway authenticates requests using an [API key](https://vercel.com/docs/ai-gateway/authentication-and-byok#api-key-authentication) or [OIDC token](https://vercel.com/docs/ai-gateway/authentication-and-byok#oidc-token-authentication). You do not need to manage provider credentials directly.

## [Copy link to heading](#when-to-use-devstral-small-2)When to Use Devstral Small 2

### Best for

- Compact agentic coding: Tasks requiring a context window of 256K tokens at 24B parameters
- Multimodal debugging workflows: Combining code and screenshots or diagrams
- Apache 2.0 for commercial products: Teams that need an Apache 2.0 license for a coding model

### Consider alternatives when

- Higher SWE-bench scores: You need a stronger score (consider Devstral 2)
- No image input needed: Devstral Small meets your accuracy bar
- Reasoning-first problem solving: Tasks where deep reasoning matters more than agentic code execution (consider Magistral models)

## [Copy link to heading](#conclusion)Conclusion

Devstral Small 2 competes with systems five times its scale on real-world software engineering benchmarks. It adds a context window of 256K tokens and multimodal input over the first generation. Choose it when you need a compact agentic coding model under Apache 2.0.