Skip to content

Codestral Embed

Codestral Embed is Mistral AI's first embedding model specialized for code, outperforming general-purpose and competing code embedding models on real-world retrieval benchmarks.

index.ts
import { embed } from 'ai';
const result = await embed({
model: 'mistral/codestral-embed',
value: 'Sunny day at the beach',
})

Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
ZDR
No Training
Release Date
Mistral AI
Legal:Terms
Privacy
$0.15/M
05/28/2025