Mistral API key
Connect a Mistral API key to AI Wallet, billed to the account that owns the key, with Mistral's chat models.
The Mistral API key account answers with a key from Mistral. The wallet lists it as Mistral under "With an API key", with the id mistral-key.
What the visitor needs
A Mistral API key. Mistral bills the account that owns the key.
Connect
- The visitor creates an API key in Mistral's console, on the account that should pay.
- In the wallet, the visitor picks Mistral under "With an API key".
- The visitor pastes the key in the "Mistral API key" field and presses Connect.
The wallet keeps the key in its encrypted vault, without the spaces around it. It makes no test call, and a wrong key shows up as the provider's error on the first answer. The key has no expiry in the wallet and stays in the vault until the visitor removes the account.
Models
The wallet lists the models of https://api.mistral.ai/v1/models, newest first. The wallet leaves out the ids that name another kind of model: those containing embed, audio, realtime, transcribe, tts, image, dall, whisper, moderation, search, ocr or codex. It keeps the list for a day. The visitor picks the account's default model in its settings, and a model per site with the buttons of the side panel. Without a choice, the account answers with mistral-large-latest.
Usage and limits
The wallet reads x-ratelimit-remaining-tokens and x-ratelimit-limit-tokens on each answer that carries them. The room left is the remaining tokens divided by the limit. Without these headers, the card keeps saying "Usage shows after the first answer", and Auto ranks the account among the accounts with no reading.
Calls
Answers come from https://api.mistral.ai/v1/chat/completions in the OpenAI chat completions protocol, with the key. All four request options reach Mistral.