Skip to main content

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_KEY env var)
  • baseURL: Custom API endpoint URL
  • headers: Custom headers for requests

Available Models

Text Models

  • mistral-large-latest - Most capable model
  • mistral-medium-latest - Balanced performance
  • mistral-small-latest - Fast and efficient
  • pixtral-large-latest - Multimodal model with vision

Reasoning Models

  • magistral-small-2507 - Reasoning model
  • magistral-medium-2507 - Advanced reasoning

Advanced Features

Tool Calling

Vision (Pixtral)

PDF Support

Reasoning Models

Embeddings

Available Models:
  • mistral-embed (1024 dimensions)

Model Capabilities

Resources