Skip to main content
xAI is a platform for providing endpoints for Large Language models. See their list of models here. We recommend experimenting to find the best-suited model for your use-case. The grok-3 model is good for most use-cases.

Authentication

Set your XAI_API_KEY environment variable. You can get one from xAI here.

Example

Use xAI with your Agent:
xAI models support live search capabilities that can access real-time information:
View more examples here.

Params

xAI also supports the params of OpenAI.