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