> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phidata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# xAI

## Example

<CodeGroup>
  ```python agent.py theme={null}
  from phi.agent import Agent
  from phi.model.xai import xAI

  agent = Agent(
      model=xAI(id="grok-beta"),
      instructions=["Use tables to display data."],
      show_tool_calls=True,
      markdown=True,
  )

  agent.print_response("What is the stock price of NVDA and TSLA")
  ```
</CodeGroup>

## xAI Params

<Snippet file="model-xai-params.mdx" />

`xAI` is a subclass of the [OpenAILike](/reference/model/openai-like) class and has access to the same params.
