Skip to main content
Version: Next

xAI Models

To use a language model hosted on xAI, specify xai path in the from field and the associated xai_api_key parameter. When no model is specified in the from field (i.e., from: xai), the default model is grok-4.3.

ParamDescriptionDefault
xai_api_keyThe xAI API key.-
xai_usage_tierxAI usage tier (0-4). Used for rate limit defaults.-

Example:

models:
- from: xai:grok-4.3
name: xai
params:
xai_api_key: ${secrets:SPICE_GROK_API_KEY}

Refer to the xAI models documentation for more details on available models and configurations.

note

Although the xAI documentation shows that xAI models can return structured outputs, this is not true.