Mistral API 401 Unauthorized: API Key Not Working

Share
Workaround available API Updated November 14, 2026Based on 2 user reportsHow we research

Quick answer

A 401 means the API key is missing, invalid, revoked, expired or from another workspace. Create a fresh key in the console and send it as a Bearer token.

Most likely fix: Check the header

How to fix it

Try these in order — the most common fix is first.

  1. 1. Check the header

    1. Send Authorization: Bearer YOUR_API_KEY
    2. Make sure no whitespace or quotes ended up in the environment variable
    Did this fix it?
  2. 2. Verify the key in the console

    1. Open the API keys page in the console
    2. Confirm the key exists, is not revoked and belongs to the workspace you expect
    3. Create a new key and replace the old one
    Did this fix it?
  3. 3. Use the right key type

    1. Create a pay-as-you-go API key in the console instead of a plan key from Code > Vibe CLI
    2. If you cannot tell which key type you have, contact support with your organization ID (never the key itself)
    Did this fix it?

Symptoms

Requests return 401 Unauthorized (authentication_error), including right after getting a Vibe quota email or creating a key.

Why it happens

  • Key is missing, mistyped, revoked or expired
  • Key belongs to a different workspace than the one you are calling
  • Header not sent as Authorization: Bearer YOUR_API_KEY
  • Key created as a plan key (Code, Vibe CLI) instead of a pay-as-you-go API key

This guide also covers

  • mistral api key not working
  • mistral 401 unauthorized
  • mistral invalid api key

Still not working?

If Mistral AI keeps failing, you're not alone. See every Mistral AI problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

Other Mistral AI errors

All 11 Mistral AI errors and fixes →