| 1 | --- |
| 2 | title: "How to Set Up Codestral" |
| 3 | --- |
| 4 | |
| 5 | **Here is a step-by-step guide on how to set up Codestral with Continue using the Mistral AI API:** |
| 6 | |
| 7 | 1. Install the Continue VS Code or JetBrains extension following the instructions [here](/getting-started/install) |
| 8 | |
| 9 | 2. Click on the gear icon in the bottom right corner of the Continue window to open `~/.continue/config.json` (MacOS) / `%userprofile%\.continue\config.json` (Windows) |
| 10 | |
| 11 | 3. Log in and create an API key on Mistral AI's La Plateforme [here](https://console.mistral.ai/codestral). Make sure you get an API key from the "Codestral" page. |
| 12 | |
| 13 | 4. To use Codestral as your model for both `autocomplete` and `chat`, insert your Mistral API key below and add it to your configuration file: |
| 14 | |
| 15 | - YAML |
| 16 | - JSON |
| 17 | |
| 18 | config.yaml |
| 19 | |
| 20 | ``` |
| 21 | models: - name: Codestral provider: mistral model: codestral-latest apiKey: <YOUR_CODESTRAL_API_KEY> apiBase: https://codestral.mistral.ai/v1 roles: - chat - autocomplete |
| 22 | ``` |
| 23 | |
| 24 | config.json |
| 25 | |
| 26 | ```json |
| 27 | { |
| 28 | "models": [ |
| 29 | { |
| 30 | "title": "Codestral", |
| 31 | "provider": "mistral", |
| 32 | "model": "codestral-latest", |
| 33 | "apiKey": "<YOUR_CODESTRAL_API_KEY>", |
| 34 | "apiBase": "https://codestral.mistral.ai/v1" |
| 35 | } |
| 36 | ], |
| 37 | "tabAutocompleteModel": [ |
| 38 | { |
| 39 | "title": "Codestral", |
| 40 | "provider": "mistral", |
| 41 | "model": "codestral-latest", |
| 42 | "apiKey": "<YOUR_CODESTRAL_API_KEY>", |
| 43 | "apiBase": "https://codestral.mistral.ai/v1" |
| 44 | } |
| 45 | ] |
| 46 | } |
| 47 | ``` |
| 48 | |
| 49 | 5. If you run into any issues or have any questions, please join our Discord and post in the `#help` channel [here](https://discord.gg/EfJEfdFnDQ) |