Get your API key
Create or sign into your xAI account
Head to the xAI Console and sign up or log in.
Available models
All models are defined in the unified model registry atlib/ai/models.ts.
| Model | ID | Features |
|---|---|---|
| Grok 4 | grok-4-latest | — |
| Grok 4.1 | grok-4-1 | — |
| Grok 4.1 Fast Reasoning | grok-4-1-fast-reasoning | Thinking/Reasoning |
Apps using Grok
Grok is integrated through Vercel AI SDK 6.0, with provider routing handled bylib/ai/ai-utils.ts.
Chat
Multi-provider chat app — Grok is available as an LLM provider
Marketing Plan
Generate structured marketing plans using Grok models
Launch Simulator
Generate Product Hunt launch simulations using Grok models
How it works
The codebase uses Vercel AI SDK 6.0 with a unified model registry — no direct xAI API calls needed. Here’s the typical flow for an AI request:- You select a model from the unified registry
- The request goes through
getModelInstance()inlib/ai/ai-utils.ts - The provider is determined via
getProviderFromModelId() - The model is instantiated with
customModel() - The response is streamed back to you
- Results are stored in PostgreSQL
Structure
Understand the full project structure of the codebase.

