| name | groq-install-auth |
| description | Install and configure Groq SDK authentication for TypeScript or Python.
Use when setting up a new Groq integration, configuring API keys,
or initializing the groq-sdk in your project.
Trigger with phrases like "install groq", "setup groq",
"groq auth", "configure groq API key".
|
| allowed-tools | Bash(npm:*), Bash(pip:*), Bash(export:*) |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","groq","api","authentication"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Groq Install & Auth
Overview
Install the official Groq SDK and configure API key authentication. Groq provides ultra-fast LLM inference on custom LPU hardware through an OpenAI-compatible REST API at api.groq.com/openai/v1/.
The workflow is four steps: install the SDK, mint an API key, export it as an
environment variable, and verify the connection by listing models. Each step is
summarized below; deep detail lives in references/.
Prerequisites
- Node.js 18+ or Python 3.8+
- Package manager (npm, pnpm, or pip)
- Groq account at console.groq.com
- API key from GroqCloud console (Settings > API Keys)
Instructions
Step 1: Install the SDK
set -euo pipefail
npm install groq-sdk
pip install groq
Step 2: Get Your API Key
- Go to console.groq.com/keys
- Click "Create API Key"
- Copy the key (starts with
gsk_)
- Store it securely -- you cannot view it again
Step 3: Configure Environment
Add the .gitignore template
before writing any .env file so a key can never be committed:
export GROQ_API_KEY="gsk_your_key_here"
echo 'GROQ_API_KEY=gsk_your_key_here' >> .env
Step 4: Verify the Connection
Run a short script that lists the models your key can access — a successful list
proves authentication end-to-end. The essential TypeScript skeleton:
import Groq from "groq-sdk";
const groq = new ({ : process.. });
models = groq..();
.(models..( m.));