To use a language model hosted on xAI, specify xai path in the from field and the associated xai_api_key parameter:
| Param | Description | Default |
|---|---|---|
xai_api_key | The xAI API key. | - |
Example:
Refer to the xAI models documentation (opens in a new tab) for more details on available models and configurations.
:::note Although the xAI documentation (opens in a new tab) shows that xAI models can return structured outputs, this is not true. :::