xAI
xAI (Grok) served over an OpenAI-compatible chat-completions endpoint, selected with LLM_PROVIDER=xai, used to extract facts from conversations.
Enable it
bash
LLM_PROVIDER=xai
OPENAI_API_KEY=<xai-api-key>
OPENAI_BASE_URL=https://api.x.ai/v1
OPENAI_LLM_MODEL=grok-3Configuration
| Variable | Default | Description |
|---|---|---|
LLM_PROVIDER | openai | Set to xai. |
OPENAI_API_KEY | (none) | xAI API key, sent as a bearer token. |
OPENAI_BASE_URL | https://api.openai.com/v1 | Point at xAI's endpoint: https://api.x.ai/v1. |
OPENAI_LLM_MODEL | gpt-4.1-nano | An xAI model, e.g. grok-3. |
Notes
- OpenAI-compatible: the provider reuses the OpenAI request handling and only differs by base URL, key, and model.
- You must override
OPENAI_BASE_URLto xAI's endpoint; its default points at OpenAI.