Mistral: Invalid API Key (401 Unauthorized)

The Mistral API rejected the request because the API key is missing, invalid, expired, or issued for the wrong endpoint. A notable Mistral-specific gotcha: Mistral has two separate API key namespaces — standard keys work on api.mistral.ai, while Codestral-specific keys are required for codestral.mistral.ai. Using a standard Mistral key on the Codestral endpoint (or vice versa) returns a 401 even though the key itself is valid.