Unified.to
All articles

How to Get a Mistral AI API Key


February 20, 2026

Mistral AI is a European LLM provider offering models like Mistral Large and Mistral Small through its API platform.

If you're building an AI-native SaaS product, internal assistant, or agent system, you'll need a Mistral API key.

This guide covers:

  1. Creating your Mistral account
  2. Generating your API key
  3. Configuring billing
  4. Testing your first API call
  5. Using Mistral via Unified's Generative AI API

Step 1: Create or Log In to Your Mistral Account

Go to:

https://console.mistral.ai

Sign in or create a new account.

If you're creating a new account, you'll need to:

  • Set up a workspace
  • Name it
  • Accept terms

Workspaces determine billing and rate limits.

Step 2: Navigate to API Keys

In the console:

Left sidebar → API Keys

Direct URL:

https://console.mistral.ai/api-keys

Step 3: Create a New API Key

Click:

Create new key

You'll be prompted to:

  • Assign a name (e.g., prod-backend, staging)
  • Optionally set an expiration date

Once created, the key will be displayed once.

Copy it immediately and store it securely.

Note: The key may take a few minutes to become active.

Step 4: Store Your Key Securely

Recommended: environment variable.

macOS / Linux

export MISTRAL_API_KEY="<your_key>"

Never:

  • Commit API keys to version control
  • Embed them in client-side code
  • Share them publicly

Treat API keys like credentials.

Step 5: Configure Billing

Mistral offers a limited free tier for experimentation, but production usage typically requires billing.

In the console:

Billing

You may need to:

  • Add a payment method
  • Purchase initial credits
  • Configure auto-reload

Rate limits depend on usage tier and model.

Step 6: Test Your API Key

Example request:

curl https://api.mistral.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $MISTRAL_API_KEY" \
  -d '{
    "model": "mistral-large-latest",
    "messages": [
      {"role": "user", "content": "Explain what an API key is in two sentences."}
    ]
  }'

Common errors:

  • 401 Unauthorized → incorrect or inactive key
  • 400 Bad Request → malformed request payload
  • 404 Not Found → incorrect model name
  • 429 Too Many Requests → rate limit exceeded

Using Mistral in a Multi-Model AI Architecture

Calling Mistral directly works if you only plan to use one LLM provider.

Most AI-native SaaS teams need:

  • Provider fallback
  • Cost routing
  • Model comparison
  • Embedding portability
  • Enterprise flexibility

Instead of building separate integrations for:

  • Mistral
  • OpenAI
  • Anthropic
  • Gemini
  • Groq

…you can integrate once using Unified's Generative AI API.

Build Once Across LLM Providers

Unified's Generative AI API standardizes:

  • Models
  • Prompts
  • Embeddings

Across supported providers, including Mistral.

Standardized objects

Model

  • id
  • max_tokens
  • temperature support

Prompt

  • model_id
  • messages
  • temperature
  • max_tokens
  • responses
  • tokens_used

Embedding

  • model_id
  • content
  • dimension
  • embeddings
  • tokens_used

This allows you to:

  • Switch between Mistral and other providers without rewriting integration logic
  • Compare outputs across models
  • Route requests based on cost or availability
  • Keep your product architecture provider-agnostic

You integrate once at the GenAI layer.

Why This Matters for AI-Native SaaS Teams

Calling Mistral is straightforward.

Shipping:

  • AI copilots
  • Agent-based write actions
  • Multi-provider routing
  • Embedding pipelines
  • Enterprise-grade SaaS integrations

…requires integration infrastructure.

Unified was built for:

  • Real-time integration access
  • Pass-through architecture
  • Zero-storage design
  • MCP-compatible AI agents
  • Usage-based scaling

Mistral generates intelligence.

Unified connects that intelligence to structured SaaS data and authorized actions.

That's how AI features move from experimentation to production.

→ Start your 30-day free trial

→ Book a demo

All articles