Loading the catalogue…
Loading the catalogue…
Mistral AI's code-specialised embedding model: text and code input up to 8,192 tokens, returning matryoshka-style vectors up to 3,072 dimensions in float or quantised dtypes for code retrieval and search.
Overview. Codestral Embed is Mistral AI's first code-specialised embedding model, released on 28 May 2025 and distributed only through Mistral's API and Batch API as a closed-weight product. It ingests text or code up to an 8,192-token window and returns a numeric embedding vector rather than generated text. Developers reach for it when they need code representations for search, clustering, or retrieval over a codebase, where a general-purpose embedding model would capture semantics less accurately.
Key strengths. The model emits matryoshka-style vectors: the default 1,536 dimensions can be truncated to any smaller count while preserving the most relevant components first, up to a maximum of 3,072 dimensions. Output can be requested as float, int8, uint8, binary, or ubinary, which lets a developer trade storage and comparison cost against precision without re-embedding. Mistral positions it for code-retrieval workloads and recommends chunking source at roughly 3,000 characters with 1,000-character overlap to keep retrieval quality stable across file boundaries.
When to use it. Use this for code retrieval and semantic search over repositories, where a code-specialised embedding produces more useful nearest-neighbour results than a text model. The matryoshka output makes it a good fit when you need to vary embedding dimension per index or tier — full-width vectors for a high-precision store, truncated binary vectors for a fast first-pass filter. The 8,192-token window suits whole functions or multi-file chunks, and the code-specialised objective is a better match for identifier- and syntax-heavy text than a general embedding endpoint.
Limitations. The model is embedding-only: it returns vectors, so it cannot generate text, call tools, or serve as a chat or reasoning model despite carrying the Codestral name. Input is text and code only — there is no image or audio support. The input window is 8,192 tokens, and Mistral has not published a parameter count, architecture, or training cutoff, so the model's internal capacity and recency cannot be assessed from documentation.
Sovereignty note. Codestral Embed is built by Mistral AI, a French creator with no CLOUD Act exposure, and is served only through Mistral's API with no public weights. An EU-resident endpoint tier is available for Sovereign routing where data must remain within the EU.
| Inference Provider | Sovereignty | Runs in | Price | Status | Pin |
|---|---|---|---|---|---|
| L1 | €0.15 per 1M input tokens | Online |
10 use cases classified by the curator. The note says why.
High-fidelity code embeddings are ideal for categorizing snippets by programming language, library usage, or functional purpose.
Specialized 3,072-dimension vectors optimized specifically for code retrieval provide high-precision searching across large repositories.
The model's ability to represent code structure in vector space enables accurate automated metadata tagging for technical documentation and source files.
Serves as a critical retrieval layer for coding agents, allowing them to contextually query and navigate large existing codebases.
Enables searching across issue trackers and codebase history to find past fixes for similar patterns in code or error logs.
Facilitates code review by retrieving semantically similar PRs or historical commits to provide reviewers with relevant context.
While a bi-encoder, the 3,072-dimensional output provides sufficient signal for effective similarity-based reranking in technical RAG stacks.
Efficiently routes technical support tickets or bug reports to the correct engineering team by measuring similarity to specific project modules.
The model produces vector representations only and cannot generate natural language answers or explanations.
This is an embedding model focused on retrieval; it lacks the autoregressive generation capabilities required for autocomplete or suggestions.
Sourced numbers, not our own evaluations. Percentiles are against the embedding models on Stav.
curl https://api.stav.ai/v1/embeddings \
-H "Authorization: Bearer $STAV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "mistral-ai/codestral-embed-2505",
"input": ["Hello, world"]
}'→ X-Stav-Request-Id · X-Stav-Model · X-Stav-Provider → X-Stav-Sovereignty-Level — the rung the request was served at