### Install xAI Grok Provider with npm Source: https://github.com/eldon31/xai_ai_sdk_docs/blob/main/README.md Installs the xAI Grok provider module using npm. This is a prerequisite for using the provider in your project. ```bash npm i @ai-sdk/xai ``` -------------------------------- ### Generate Text with xAI Grok Provider Source: https://github.com/eldon31/xai_ai_sdk_docs/blob/main/README.md Example of generating text using the xAI Grok provider with the AI SDK's 'generateText' function. It specifies the model (e.g., 'grok-3-beta') and provides a prompt for text generation. The output is the generated text. ```typescript import { xai } from '@ai-sdk/xai'; import { generateText } from 'ai'; const { text } = await generateText({ model: xai('grok-3-beta'), prompt: 'Write a vegetarian lasagna recipe for 4 people.', }); ``` -------------------------------- ### Import Default xAI Grok Provider Instance Source: https://github.com/eldon31/xai_ai_sdk_docs/blob/main/README.md Imports the default provider instance named 'xai' from the '@ai-sdk/xai' module. This instance is used to interact with xAI's language models. ```typescript import { xai } from '@ai-sdk/xai'; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.