xAI Grok

Updated

Integrate xAI Grok as the LLM with the Conversational AI Engine.

xAI provides access to Grok large language models through an OpenAI-compatible chat completions API for conversational AI applications.

Sample configuration

The following example shows a starting llm parameter configuration you can use when you Start a conversational AI agent.

"llm": {
  "url": "https://api.x.ai/v1/chat/completions",
  "api_key": "<your_llm_key>",
  "system_messages": [
    {
      "role": "system",
      "content": "You are a helpful chatbot."
    }
  ],
  "max_history": 32,
  "greeting_message": "Hello, how can I assist you?",
  "failure_message": "Please hold on a second.",
  "params": {
    "model": "grok-4.3"
  },
  "vendor": "xai"
}

Key parameters

required
ParameterDescription
urlstring
required

The xAI chat completions endpoint. Set to https://api.x.ai/v1/chat/completions.

api_keystring
required

The xAI API key used to authenticate requests.

vendorstring
required

The LLM vendor. Set to xai.

paramsobject
optional

Additional parameters passed directly to the xAI API.

params

The table extends beyond the current width. Scroll horizontally to view more columns.

For more information, refer to the xAI Chat Completions documentation.