The API key for xAI (defaults to XAI_API_KEY env var)
base_url
str
"https://api.x.ai/v1"
The base URL for the xAI API
search_parameters
Optional[Dict[str, Any]]
None
Search configuration for xAI live search, sent in the request body
grok-4-1-fast-non-reasoning-latest is retained here because it is the class default in the pinned source. xAI has retired this alias and redirects it to Grok 4.3. Use xAI(id="grok-4.3", reasoning_effort="none") for the equivalent current configuration.
xAI extends OpenAILike and accepts all of its parameters.