xAI
Configure xAI as a custom endpoint in LibreChat.
xAI serves its Grok models through an OpenAI-compatible API that you can add to LibreChat as a custom endpoint.
Get an API key
Create a key from the xAI console. Add it to your .env file:
XAI_API_KEY=your-api-keyConfiguration
Add the endpoint under endpoints.custom in your librechat.yaml:
- name: "xai"
apiKey: "${XAI_API_KEY}"
baseURL: "https://api.x.ai/v1"
models:
default: ["grok-beta"]
fetch: false
titleConvo: true
titleMethod: "completion"
titleModel: "grok-beta"
summarize: false
summaryModel: "grok-beta"
modelDisplayLabel: "Grok"Notes
titleMethod: "completion"generates conversation titles through the chat completions endpoint, which is what Grok supports.
How is this guide?