groq-common-errors
FreeNo executable scriptsNot checkedDiagnose and fix Groq API errors with real error codes and solutions. Use when encountering Groq errors, debugging failed requests, or troubleshooting…
by jeremylongshore★ 2,961 GitHub starsAbout this skill
Groq Common Errors
Overview
Comprehensive reference for Groq API error codes, their root causes, and proven fixes. Groq returns standard HTTP status codes with structured error bodies and rate-limit headers. This skill walks the diagnosis from raw error string to fix, then hands off to the full per-status reference for depth.
Every Groq error body follows one shape — read the code and type first:
{
"error": {
"message": "Rate limit reached for model `llama-3.3-70b-versatile`...",
"type": "tokens",
"code": "rate_limit_exceeded"
}
}
Prerequisites
GROQ_API_KEYexported in the environment (keys start withgsk_).curlandjqavailable for the diagnostic probes below.- For SDK-level handling:
groq-sdk(TypeScript) orgroq(Python) installed.
Instructions
Capture the failing status and body. Read the raw error response — the HTTP status plus the
code/typefields determine the whole diagnosis path.Confirm the key works before assuming anything deeper:
set -euo pipefail # Verify API key is valid — expect a model count, not an auth error curl -s https://api.groq.com/openai/v1/models \ -H "Authorization: Bearer $GROQ_API_KEY" | jq '.data | length'Confirm the model still exists. Many 400s are deprecated model IDs — list the live models and Grep your codebase for any stale ID:
curl -s https://api.groq.com/openai/v1/models \ -H "Authorization: Bearer $GROQ_API_KEY" | jq '.data[].id' | sortMap the status to a fix using the table below, then drill into references/error-reference.md for the exact error string, causes, and copy-paste fix.
For SDK integrations, branch on the typed exception classes — see references/sdk-error-handling.md.
Output
A diagnosis that names the error class, the root cause, and the concrete fix — for example: "429 on TPM: token budget exhausted; add the single-retry handleRateLimit wrapper and honor retry-after," or "400: mixtral-8x7b-32768 is deprecated; switch to llama-3.3-70b-versatile." When run against real code, the output is the edited call site plus a verification curl that returns 200.
Error Handling
Map the HTTP status to its cause; full error strings, rate-limit headers, and fixes live in references/error-reference.md.
| Status | Meaning | First move |
|---|---|---|
| 401 | Invalid / missing key | Confirm GROQ_API_KEY starts with gsk_; test with /models |
| 429 | RPM / TPM / RPD limit hit | Read retry-after; back off and single-retry |
| 400 | Deprecated model or bad params | List live models; replace stale IDs |
| 413 | Request over context window | Trim prompt (Llama models cap at 128K tokens) |
| 500 / 503 | Groq-side outage or overload | Retry with backoff; fall back model; check status page |
When the failure is transient (429/500/503), retry with backoff and honor retry-after rather than hammering. When it is structural (401/400/413), fix the request — retrying will not help.
Examples
Minimal end-to-end probe that isolates auth vs. model vs. payload problems:
# A 200 here means key + model + payload are all valid; a non-200 status
# tells you which layer failed.
curl -s -o /dev/null -w "%{http_code}" \
https://api.groq.com/openai/v1/chat/completions \
-H "Authorization: Bearer $GROQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"llama-3.1-8b-instant","messages":[{"role":"user","content":"ping"}],"max_tokens":5}'
- Rate-limit retry wrapper (TypeScript, honors
retry-after): see the 429 section of references/error-reference.md. - Typed SDK exception branching (TypeScript + Python): references/sdk-error-handling.md.
Resources
- Groq Error Codes
- Groq Rate Limits
- Groq Model Deprecations
- Groq Status Page
- Full per-status reference: references/error-reference.md
- SDK error handling + escalation path: references/sdk-error-handling.md
- For comprehensive debugging, see the
groq-debug-bundleskill.
Install groq-common-errors in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
ReadGrepBash(curl:*)Bundled files
FAQ
What does the groq-common-errors skill do?
Diagnose and fix Groq API errors with real error codes and solutions. Use when encountering Groq errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "groq error", "fix groq", "groq not working", "debug groq", "groq 429".
How do I install the groq-common-errors skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the groq-common-errors skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
by Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
by Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
by Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
by Anthropic