Mistral AI errors

Mistral AI error "Invalid API Key": cause and fix

Invalid API Key

Why it happens

HTTP 401 with {"detail":"Invalid API Key"}. The key is missing, incomplete, expired or deleted.

How to fix it

Confirm that MISTRAL_API_KEY holds the full key in the terminal or process that sends the request, or create a new key.

When an agent hits this error

Agents that hold a raw key often respond to authentication errors by asking you to paste the key again, which puts it in the transcript. A broker that owns the key can report a typed outcome instead (wrong account, revoked key, missing permission) so the agent can say what is wrong without being handed the value. That is how BotPassword's intents report failures.

Everything about Mistral AI API keys

Give agents access. Keep the keys.

BotPassword is in early access. Request an invite and we'll email you when your spot opens.