Read through this guide to set up Groq & get familiar with how it is used
across the different apps.
Set up Groq
First, create a Groq account or sign in. Next, navigate to the API key page and “Create API key”. Make sure to save this somewhere safe and do not share it with anyone. Once you have your API key, paste it in your .env file:Available Models
Groq models are defined in the unified model registry atlib/ai/models.ts. Both models support vision capability.
| Model | ID | Features |
|---|---|---|
| Llama 4 Scout | meta-llama/llama-4-scout-17b-16e-instruct | Vision |
| Llama 4 Maverick | meta-llama/llama-4-maverick-17b-128e-instruct | Vision |
Apps Using Groq
Groq is integrated through the Vercel AI SDK 6.0. Provider routing is handled bylib/ai/ai-utils.ts using customModel(), getProviderFromModelId(), and getModelInstance().
Chat
Multi-provider chat app — Groq is available as an LLM provider
Audio
Record audio and summarize transcriptions using Groq models
Structured Output
Generate structured JSON output using Groq models
Structure
The codebase uses Vercel AI SDK 6.0 with a unified model registry instead of direct Groq API calls. Models are registered inlib/ai/models.ts and routing is managed through lib/ai/ai-utils.ts.
The typical flow for an AI request:
- The user selects a model from the unified model registry
- The request is routed 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 the user
- Results are stored in Supabase
Structure
Understand the project structure of the codebase

