Mistral
Mistral AI provides access to state-of-the-art language models including Mistral Large, Mistral Medium, and other advanced models. Braintrust integrates seamlessly with Mistral through direct API access, wrapper functions for automatic tracing, and proxy support.
Setup
To use Mistral models, configure your Mistral API key in Braintrust.
- Get a Mistral API key from Mistral AI Console
- Add the Mistral API key to your organization's AI providers
- Set the Mistral API key and your Braintrust API key as environment variables
API keys are encrypted using 256-bit AES-GCM encryption and are not stored or logged by Braintrust.
Use Mistral with Braintrust AI proxy
The Braintrust AI Proxy allows you to access Mistral models through a unified OpenAI-compatible interface.
First, install the braintrust
and openai
packages.
pnpm add braintrust openai
Then, initialize the client and make a request to a Mistral model via the Braintrust AI Proxy.
Trace logs with Mistral
Trace your Mistral LLM calls for observability and monitoring.
When using the Braintrust AI Proxy, API calls are automatically logged to the specified project.
The Braintrust AI Proxy is not required to trace Mistral API calls. For more control, learn how to customize traces.
Evaluate with Mistral
Evaluations distill the non-deterministic outputs of Mistral models into an effective feedback loop that enables you to ship more reliable, higher quality products. Braintrust Eval
is a simple function composed of a dataset of user inputs, a task, and a set of scorers. To learn more about evaluations, see the Experiments guide.
To learn more about tool use, multimodal support, attachments, and masking sensitive data with Mistral, visit the customize traces guide.
Models and capabilities
Model | Multimodal | Reasoning | Max input | Max output | Input $/1M | Output $/1M |
---|---|---|---|---|---|---|
magistral-medium-latest | 40,960 | 40,000 | $2.00 | $5.00 | ||
magistral-medium-2506 | 40,960 | 40,000 | $2.00 | $5.00 | ||
magistral-small-latest | 40,000 | 40,000 | $0.50 | $1.50 | ||
magistral-small-2506 | 40,000 | 40,000 | $0.50 | $1.50 | ||
devstral-small-latest | 128,000 | 128,000 | $0.10 | $0.30 | ||
devstral-small-2507 | 128,000 | 128,000 | $0.10 | $0.30 | ||
mistral-large-latest | ﹣ | ﹣ | $2.00 | $6.00 | ||
mistral-large-2411 | ﹣ | ﹣ | $2.00 | $6.00 | ||
pixtral-large-latest | ﹣ | ﹣ | $2.00 | $6.00 | ||
pixtral-large-2411 | ﹣ | ﹣ | $2.00 | $6.00 | ||
mistral-medium-latest | ﹣ | ﹣ | $0.40 | $2.00 | ||
mistral-medium-2505 | ﹣ | ﹣ | $0.40 | $2.00 | ||
mistral-small-latest | ﹣ | ﹣ | $0.10 | $0.30 | ||
mistral-small-2501 | ﹣ | ﹣ | $0.10 | $0.30 | ||
codestral-latest | ﹣ | ﹣ | $0.30 | $0.90 | ||
codestral-2501 | ﹣ | ﹣ | $0.30 | $0.90 | ||
ministral-8b-latest | ﹣ | ﹣ | $0.10 | $0.10 | ||
ministral-8b-2410 | ﹣ | ﹣ | $0.10 | $0.10 | ||
ministral-3b-latest | ﹣ | ﹣ | $0.04 | $0.04 | ||
ministral-3b-2410 | ﹣ | ﹣ | $0.04 | $0.04 | ||
mistral-saba-latest | ﹣ | ﹣ | $0.20 | $0.60 | ||
mistral-saba-2502 | ﹣ | ﹣ | $0.20 | $0.60 | ||
pixtral-12b-2409 | ﹣ | ﹣ | $0.15 | $0.15 | ||
open-mistral-nemo | ﹣ | ﹣ | $0.15 | $0.15 | ||
open-mistral-nemo-2407 | ﹣ | ﹣ | $0.15 | $0.15 | ||
open-codestral-mamba | ﹣ | ﹣ | $0.60 | $0.60 | ||
open-mixtral-8x22b | ﹣ | ﹣ | $2.00 | $6.00 | ||
mistral-tiny | ﹣ | ﹣ | $0.15 | $0.46 | ||
mistral-small | ﹣ | ﹣ | $1.00 | $3.00 | ||
mistral-medium | ﹣ | ﹣ | $2.75 | $8.10 |