Codestral vs Z.ai API
A side-by-side look at pricing plans, free tiers, features, pros and cons, updated for 2026. Codestral starts at See pricing page and Z.ai API starts at See pricing page. Check both pricing pages for current plans.
At a glance
Best for
Category
Pricing model
Starting price
Free plan
Made by
Based in
Rating
Key features
- 80+ programming languages
- Fill-in-the-middle completion
- Instruction endpoint
- Open weights
- IDE plugin support
- GLM flagship and Flash models
- OpenAI-compatible API
- GLM Coding Plans
- Vision models
- Tool calling
| Feature | Codestral | Z.ai API |
|---|---|---|
| Best for | Mistral AI's code model for completion and fill-in-the-middle | Pay-per-token API and coding plans for Zhipu's GLM models |
| Category | Models & APIs | Models & APIs |
| Pricing model | Freemium | Paid |
| Starting price | See pricing page | See pricing page |
| Free plan | Yes | No |
| Made by | Mistral AI | Z.ai (formerly Zhipu AI) |
| Based in | France | China |
| Rating | No ratings yet | No ratings yet |
| Key features |
|
|
Pricing compared
Codestral starts at See pricing page and Z.ai API starts at See pricing page. Check both pricing pages for current plans.
Free plan
Cheapest paid plan
Top plan
Free trial
Prices in USD, checked Oct 28, 2026 or later. Plans change often, so confirm on each tool's site before you buy.
Pros and cons
Codestral
- Strong at code completion
- Weights available for local testing
- Broad language coverage
- Open weights not licensed for production
- Usage-based API costs
- Narrower than general chat models
Z.ai API
- Low cost for strong coding models
- Fixed-price coding plans
- Open weights released
- Less known outside developer circles
- Data processed in China
- Docs can lag releases
Which one should you choose?
Choose Codestral if you want:
- Strong at code completion
- Weights available for local testing
- Broad language coverage
Watch out: open weights not licensed for production.
Choose Z.ai API if you want:
- Low cost for strong coding models
- Fixed-price coding plans
- Open weights released
Watch out: less known outside developer circles.
Codestral vs Z.ai API FAQ
What is the difference between Codestral and Z.ai API?
Codestral: Mistral AI's code model for completion and fill-in-the-middle. Z.ai API: Pay-per-token API and coding plans for Zhipu's GLM models. Both are models & apis tools.
Is Codestral or Z.ai API cheaper?
Codestral starts at See pricing page and Z.ai API starts at See pricing page. Check both pricing pages for current plans.
Do Codestral and Z.ai API have free plans?
Codestral: Yes. Z.ai API: No.
Who makes Codestral?
Codestral is made by Mistral AI, based in France.
Who makes Z.ai API?
Z.ai API is made by Z.ai (formerly Zhipu AI), based in China.
Which should I choose, Codestral or Z.ai API?
Choose Codestral if you value strong at code completion and weights available for local testing. Choose Z.ai API if you value low cost for strong coding models and fixed-price coding plans.