Mistral AI Provider
The Mistral AI provider enables you to use Mistral’s language models for text generation, function calling, and embeddings.Installation
Setup
Get your API key from Mistral AI Console and set it as an environment variable:Usage
Basic Text Generation
Streaming Responses
Structured Output
Configuration
Custom Provider Instance
Provider Options
- apiKey: Your Mistral API key (defaults to
MISTRAL_API_KEYenv var) - baseURL: Custom API endpoint URL
- headers: Custom headers for requests
Available Models
Text Models
mistral-large-latest- Most capable modelmistral-medium-latest- Balanced performancemistral-small-latest- Fast and efficientpixtral-large-latest- Multimodal model with vision
Reasoning Models
magistral-small-2507- Reasoning modelmagistral-medium-2507- Advanced reasoning
Advanced Features
Tool Calling
Vision (Pixtral)
PDF Support
Reasoning Models
Embeddings
mistral-embed(1024 dimensions)
Model Capabilities
| Model | Vision | Tools | Structured Output |
|---|---|---|---|
| mistral-large-latest | ✗ | ✓ | ✓ |
| mistral-medium-latest | ✗ | ✓ | ✓ |
| mistral-small-latest | ✗ | ✓ | ✓ |
| pixtral-large-latest | ✓ | ✓ | ✓ |
| magistral-small-2507 | ✗ | ✓ | ✓ |