Skip to content

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

ModelContext WindowNotes
mistral-large-latest128KMost capable Mistral model
mistral-medium-latest32KBalanced performance and cost
mistral-small-latest32KFast and affordable
open-mistral-nemo128KOpen-source, multilingual
codestral-latest32KOptimized for code generation

Setup

  1. Go to Settings > Providers in the dashboard.
  2. Click Add provider and select Mistral.
  3. 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." }],
});

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-latest for code-specific tasks like generation, completion, and refactoring.

Fallback

Route to Anthropic if Mistral is unavailable:

Terminal window
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"}]}'