@tanstack/ai-groq has 2,465 recorded weekly downloads on npm, an increase of 17.7% over the past 30 days, ranking #1290 of 2,322 tracked listings.
About @tanstack/ai-groq
@tanstack/ai-groq
Groq adapter for TanStack AI
Installation
npm install @tanstack/ai-groq
# or
pnpm add @tanstack/ai-groq
# or
yarn add @tanstack/ai-groq
Setup
Get your API key from Groq Console and set it as an environment variable:
export GROQ_API_KEY="gsk_..."
Usage
Text/Chat Adapter
import { groqText } from '@tanstack/ai-groq'
import { generate } from '@tanstack/ai'
const adapter = groqText('llama-3.3-70b-versatile')
const result = await generate({
adapter,
model: 'llama-3.3-70b-versatile',
messages: [
{ role: 'user', content: 'Explain quantum computing in simple terms' },
],
})
console.log(result.text)
With Explicit API Key
import { createGroqText } from '@tanstack/ai-groq'
const adapter = createGroqText('llama-3.3-70b-versatile', 'gsk_api_key')
Supported Models
Chat Models
llama-3.3-70b-versatile- Meta Llama 3.3 70B (131k context)llama-3.1-8b-instant- Meta Llama 3.1 8B (131k context)meta-llama/llama-4-maverick-17b-128e-instruct- Meta Llama 4 Maverick (vision)meta-llama/llama-4-scout-17b-16e-instruct- Meta Llama 4 Scoutmeta-llama/llama-guard-4-12b- Meta Llama Guard 4 (content moderation, vision)meta-llama/llama-prompt-guard-2-86m- Meta Llama Prompt Guard (content moderation)meta-llama/llama-prompt-guard-2-22m- Meta Llama Prompt Guard (content moderation)openai/gpt-oss-120b- GPT OSS 120B (reasoning, tools, search)openai/gpt-oss-20b- GPT OSS 20B (reasoning, search)openai/gpt-oss-safeguard-20b- GPT OSS Safeguard 20B (content moderation, reasoning)moonshotai/kimi-k2-instruct-0905- Kimi K2 Instruct (262k context)qwen/qwen3-32b- Qwen3 32B (reasoning, tools)
Features
- ✅ Streaming chat completions
- ✅ Structured output (JSON Schema)
- ✅ Function/tool calling
- ✅ Multimodal input (text + images for vision models)
- ✅ Summarization (
groqSummarize) - ❌ Embeddings (not supported by Groq)
- ❌ Image generation (not supported by Groq)
Tree-Shakeable Adapters
This package uses tree-shakeable adapters, so you only import what you need:
// Only imports text adapter
import { groqText } from '@tanstack/ai-groq'
This keeps your bundle size small!
License
MIT
Description from the npm listing.
- ai
- ai-sdk
- typescript
- tanstack
- groq
- adapter
- llm
- chat
- low-latency
- tool-calling
- structured-outputs
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (544)Similar npm AI SDKs plugins
All 20 @tanstack/ai-groq alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@tanstack/ai-groq. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.