Skip to content

Mistral

mistral

YAML config

evalguard.config.yaml
providers:
  - id: mistral:mistral-small-latest
    config:
      apiKey: ${MISTRAL_API_KEY}

TypeScript usage

typescript
import { createProvider } from "@evalguard/core";

const provider = createProvider("mistral", process.env.MISTRAL_API_KEY);
const response = await provider.chat(
  [{ role: "user", content: "Hello" }],
  { model: "mistral-small-latest" },
);

Authentication

Set MISTRAL_API_KEY in your environment. EvalGuard validates the key on first call and surfaces typed errors for 401 / 403 / rate-limit responses (with Retry-After parsing).

Setup walkthrough

  1. 011. Sign up for an account on the Mistral website.
  2. 022. Obtain your API key from the account dashboard.
  3. 033. Review the API documentation for integration guidelines.
  4. 044. Set up your development environment with the necessary libraries.
  5. 055. Make a test API call to ensure your setup is correct.

Gotchas

  • Mistral's API has a rate limit of 60 requests per minute, which can be restrictive for high-throughput applications.
  • Certain models may not be available in all regions, so check the availability based on your deployment location.
  • The API key must be included in every request header; failing to do so will result in authentication errors.

Cost note

Pricing starts around $0.10 per 1M tokens for embeddings (Mistral Embed) and ranges up to $2.00 / $6.00 per 1M input/output tokens for the flagship model (Mistral Large 2).

Recommended models

Eval / judge
Mistral Large 2 - highest-capability model, best for evaluation/judge tasks.
Agent / tool-use
Mistral Large 2 - strong reasoning and tool-use for agent applications.
Code
Codestral - Mistral's dedicated code-generation model.
Vision
Pixtral Large - Mistral's vision-capable multimodal model.

LLM-generated (llm-gpt-4o) · 2026-05-23