$ AI PriceCompare
← All API prices
§ API model comparison

Codestral vs Grok Build 0.1 API pricing

Mistral's Codestral and SpaceXAI's Grok Build 0.1 are both code-specialist models. Codestral is cheaper per token on paper, but Grok Build's cache-hit rate and larger context change the picture for agentic coding.

Updated November 2, 2026
§ Short answer

The short answer

Codestral is cheaper on fresh tokens ($0.30/$0.90 vs $1.00/$2.00 per 1M). For agents that resend context, Grok Build's $0.20 cache hit nearly closes the gap — the coding-agent example above is almost a tie — and Grok Build accepts 256K tokens against Codestral's 128K.

§ Side by side

Prices and specs

CodestralGrok Build 0.1
ProviderMistralSpaceXAI
TierSpecialistSpecialist
Input / 1M tokens$0.30$1.00
Output / 1M tokens$0.90$2.00
Cache hit / 1M$0.03$0.20
Cache write / 1M——
Context window128K256K
NotesCode generationCode tasks; replaced Grok Code Fast 1; ≥200K tokens: $2/$4, cache $0.40

Codestral is 3.3× cheaper on input tokens ($0.30 vs $1.00 per 1M). Codestral is 2.2× cheaper on output tokens ($0.90 vs $2.00 per 1M).

§ Cost examples

Same workload, both models

WorkloadCodestralGrok Build 0.1Difference
Support chatbot
10,000 conversations × (2,000 input + 400 output tokens)
$9.60$28.00Codestral saves $18.40
Document Q&A
1,000 questions × (30,000 input + 800 output tokens)
$9.72$31.60Codestral saves $21.88
Coding agent session
4M input tokens (90% cache hits) + 150,000 output tokens
$0.36$1.42Codestral saves $1.06

Standard rates per 1M tokens from data on this site. The coding-agent row assumes 90% of input is read from the prompt cache (full input price where a model has no cache rate). Cache-write fees, batch discounts and long-context surcharges listed in the notes are not included. Updated November 2, 2026.

§ Verdict

Which one should you use?

Choose Codestral if…

you need fast, cheap code generation or completion with short context — IDE autocomplete, snippet generation, test scaffolding — where fresh tokens dominate.

Choose Grok Build 0.1 if…

you run multi-turn coding agents over large repositories, need more than 128K tokens of context, or were on Grok Code Fast 1, which it replaced.

Why caching narrows the gap

Our table lists no cache-hit rate for Codestral, so every resent token pays the $0.30 input rate. Grok Build charges $0.20 per 1M on cache hits — cheaper than Codestral's full input price. In a session that is 90% cached input, Grok Build's higher output rate is roughly offset, leaving the two within about 7% of each other. With lower cache-hit rates, Codestral pulls ahead.

Context and long prompts

Codestral's 128K window can be tight for agents that load many files at once. Grok Build accepts up to 256K tokens but bills prompts of 200K or more at $2/$4 per 1M for the whole request, so keep agent context under 200K when you can.

Batch and alternatives

Mistral's pricing page says batch processing halves prices, which suits offline jobs like bulk test generation or code migration on Codestral. For harder agentic tasks, compare general flagships too — see the best AI for coding guide.

§ FAQ

Frequently asked questions

Is Codestral cheaper than Grok Build 0.1?

On fresh input and output, yes. On cache-heavy agent sessions the two come out close, because Grok Build bills cache hits at $0.20 per 1M.

What context window does each support?

Codestral lists 128K tokens and Grok Build 0.1 256K.

What did Grok Build 0.1 replace?

It replaced Grok Code Fast 1 as SpaceXAI's code-focused model.

§ Keep reading

Related guides.

How we choose: prices come from each vendor's official pricing page and are re-checked every week. We take no affiliate fees, so rankings aren't for sale.