Files
claudemesh/.context/turbostarter-framework-context/sections/ai/docs/xai.md
Alejandro Gutiérrez d3163a5bff feat(db): mesh data model — meshes, members, invites, audit log
- pgSchema "mesh" with 4 tables isolating the peer mesh domain
- Enums: visibility, transport, tier, role
- audit_log is metadata-only (E2E encryption enforced at broker/client)
- Cascade on mesh delete, soft-delete via archivedAt/revokedAt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 21:19:32 +01:00

3.0 KiB

title, description, url
title description url
xAI Grok Setup xAI provider and learn how to use it in the starter kit. /ai/docs/xai

xAI Grok

The xAI provider integrates Grok models into your application using the AI SDK.

xAI Grok

Setup

### Generate API Key
Visit the [xAI website](https://x.ai) to create an account. After signing in, navigate to your account settings to generate an API key.
### Add API Key to Environment
Once you've acquired an API key, add it to your project's `.env` file (e.g., in `apps/web`):

```bash title=".env"
XAI_API_KEY=your-api-key
```
### Configure Provider (Optional)
The starter kit automatically uses the `XAI_API_KEY` environment variable. For advanced configurations and customization options, refer to the comprehensive [AI SDK xAI documentation](https://sdk.vercel.ai/providers/ai-sdk-providers/xai#provider-instance).

Features

Utilize xAI's language models for conversational AI, text generation, and other natural language processing tasks. Enable language models to interact with external tools and functions, allowing for more complex and automated task execution. Generate images based on textual descriptions using xAI's models.

Use Cases

Create intelligent chatbots that engage users in natural, informative conversations powered by xAI's Grok models, delivering responsive and contextually relevant interactions. Experience this capability in our [Chat Demo](/ai/docs/chat). Produce diverse, high-quality text content across various formats and styles, harnessing the unique characteristics and capabilities of Grok models for creative and informational outputs. Streamline operations by connecting xAI's language models with your existing tools through function calling, enabling sophisticated automation of complex business processes and repetitive tasks. Design striking visuals and artwork directly from text descriptions using xAI's image generation capabilities, enabling creative applications and rich visual content. Explore our [Image Generation Demo](/ai/docs/image) to see these features in action.