Mistral
Overview
Mistral AI builds high-performance open and commercial language models based in Europe. Floopy automatically translates OpenAI-format requests to Mistral’s chat API, so you can switch to Mistral models with a single line change.
Supported Models
| Model | Context Window | Notes |
|---|---|---|
mistral-large-latest | 128K | Most capable Mistral model |
mistral-medium-latest | 32K | Balanced performance and cost |
mistral-small-latest | 32K | Fast and affordable |
open-mistral-nemo | 128K | Open-source, multilingual |
codestral-latest | 32K | Optimized for code generation |
Setup
- Go to Settings > Providers in the dashboard.
- Click Add provider and select Mistral.
- Paste your Mistral API key and click Save.
Usage
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.floopy.ai/v1", apiKey: process.env.FLOOPY_API_KEY,});
const response = await client.chat.completions.create({ model: "mistral-large-latest", messages: [{ role: "user", content: "Explain quantum computing." }],});from openai import OpenAI
client = OpenAI(base_url="https://api.floopy.ai/v1", api_key=os.environ["FLOOPY_API_KEY"])
response = client.chat.completions.create( model="mistral-large-latest", messages=[{"role": "user", "content": "Explain quantum computing."}],)curl https://api.floopy.ai/v1/chat/completions \ -H "Authorization: Bearer $FLOOPY_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "mistral-large-latest", "messages": [{"role": "user", "content": "Explain quantum computing."}]}'Provider-Specific Features
- Automatic format translation — Floopy converts OpenAI chat completion format to Mistral’s chat API and back. System messages, tool use, and JSON mode are all supported.
- Code generation — Use
codestral-latestfor code-specific tasks like generation, completion, and refactoring.
Fallback
Route to Anthropic if Mistral is unavailable:
curl https://api.floopy.ai/v1/chat/completions \ -H "Authorization: Bearer $FLOOPY_API_KEY" \ -H "x-floopy-fallback-provider: anthropic" \ -H "x-floopy-fallback-model: claude-haiku-4-5" \ -H "Content-Type: application/json" \ -d '{"model": "mistral-large-latest", "messages": [{"role": "user", "content": "Hello"}]}'