| 1 | --- |
| 2 | title: "How to Configure xAI with Continue" |
| 3 | slug: ../xai |
| 4 | description: "Configure xAI's Grok 4 model with Continue for advanced chat capabilities, with easy API key setup from the xAI console" |
| 5 | sidebarTitle: "xAI" |
| 6 | --- |
| 7 | |
| 8 | <Info> |
| 9 | You can get an API key from the [xAI console](https://console.x.ai/) |
| 10 | </Info> |
| 11 | |
| 12 | ## How to Set Up xAI Chat Models |
| 13 | |
| 14 | We recommend configuring **grok-4** as your chat model. For information on other available models, visit [xAI Documentation](https://docs.x.ai/docs/models). |
| 15 | |
| 16 | <Tabs> |
| 17 | <Tab title="Config"> |
| 18 | Add the [xAI Grok 4 model block](https://hub.continue.dev/xai/grok-4) on the hub. |
| 19 | </Tab> |
| 20 | <Tab title="YAML"> |
| 21 | ```yaml title="config.yaml" |
| 22 | models: |
| 23 | - name: Grok 4 |
| 24 | provider: xAI |
| 25 | model: grok-4 |
| 26 | apiKey: <YOUR_XAI_API_KEY> |
| 27 | ``` |
| 28 | </Tab> |
| 29 | <Tab title="JSON"> |
| 30 | ```json title="config.json" |
| 31 | { |
| 32 | "models": [ |
| 33 | { |
| 34 | "title": "Grok 4", |
| 35 | "provider": "xAI", |
| 36 | "model": "grok-4", |
| 37 | "apiKey": "<YOUR_XAI_API_KEY>" |
| 38 | } |
| 39 | ] |
| 40 | } |
| 41 | ``` |
| 42 | </Tab> |
| 43 | </Tabs> |
| 44 | |
| 45 | ## How to Set Up xAI Autocomplete Models |
| 46 | |
| 47 | xAI currently does not offer any autocomplete models. |
| 48 | |
| 49 | [Click here](../../model-roles/autocomplete) to see a list of autocomplete model providers. |
| 50 | |
| 51 | ## How to Configure xAI Embeddings Models |
| 52 | |
| 53 | xAI currently does not offer any embeddings models. |
| 54 | |
| 55 | [Click here](../../model-roles/embeddings.mdx) to see a list of embeddings model providers. |
| 56 | |
| 57 | ## How to Configure xAI Reranking Models |
| 58 | |
| 59 | xAI currently does not offer any reranking models. |
| 60 | |
| 61 | [Click here](../../model-roles/reranking.mdx) to see a list of reranking model providers. |