# How to use xAI in BoltAI?

xAI has launched its API recently. Follow the steps below to use xAI in BoltAI

### Obtain an API Key

* Go to <https://console.x.ai> and sign up for an account
* Finish the onboarding
* Add billing & payment method
* Top up some credits, xAI doesn't give free credits yet

<figure><img src="/files/3Y7CwsU0y6lBTcfxK5kO" alt=""><figcaption><p>xAI Console</p></figcaption></figure>

### Create a new xAI Service in BoltAI

* Open BoltAI. Go to Settings > Services
* Click the (+) Plus button (bottom left)
* Select "xAI"
* Fill the form and click Save

<figure><img src="/files/ZRawVGiZc3tmLOePiDKf" alt=""><figcaption><p>Create a new Custom Server in BoltAI</p></figcaption></figure>

### Start a new chat

Go back to the main chat window and start a new chat with xAI

<figure><img src="/files/hhjhgNtiOpQqYiO6jgm9" alt=""><figcaption><p>Using xAI in BoltAI</p></figcaption></figure>

### Enjoy ✌️


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.boltai.com/blog/how-to-use-xai-in-boltai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
