Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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".
.claude/skills/jeremylongshore-groq-common-errors/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 56% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 109% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 78% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 37% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 44% | 0% |
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:
json{ "error": { "message": "Rate limit reached for model `llama-3.3-70b-versatile`...", "type": "tokens", "code": "rate_limit_exceeded" } }
GROQ_API_KEY exported in the environment (keys start with gsk_).curl and jq available for the diagnostic probes below.groq-sdk (TypeScript) or groq (Python) installed.code/type fields determine the whole diagnosis path.bash 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'
bash curl -s https://api.groq.com/openai/v1/models \ -H "Authorization: Bearer $GROQ_API_KEY" | jq '.data[].id' | sort
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.
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.
Minimal end-to-end probe that isolates auth vs. model vs. payload problems:
bash# 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}'
retry-after): see the 429 section of references/error-reference.md.groq-debug-bundle skill.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 17,492 | 13,828 | -21% | 1 | 1 | 0% | 2,820 | 3,470 | +23% | 0 | 0 | — |
case-02 | pass→pass | 17,167 | 14,120 | -18% | 1 | 1 | 0% | 2,492 | 4,446 | +78% | 0 | 0 | — |
case-03 | fail→fail | 16,829 | 7,360 | -56% | 1 | 1 | 0% | 1,776 | 2,754 | +55% | 0 | 0 | — |
case-04 | pass→pass | 20,023 | 11,625 | -42% | 1 | 1 | 0% | 2,477 | 3,400 | +37% | 0 | 0 | — |
case-05 | fail→pass | 20,953 | 20,552 | -2% | 1 | 1 | 0% | 2,580 | 4,020 | +56% | 0 | 0 | — |
case-06 | pass→pass | 21,767 | 14,658 | -33% | 1 | 1 | 0% | 2,895 | 4,177 | +44% | 0 | 0 | — |
case-07 | pass→pass | 8,390 | 9,536 | +14% | 1 | 1 | 0% | 1,555 | 2,130 | +37% | 0 | 0 | — |
case-08 | pass→pass | 15,654 | 9,430 | -40% | 1 | 1 | 0% | 1,839 | 2,989 | +63% | 0 | 0 | — |
case-09 | pass→pass | 18,410 | 19,783 | +7% | 1 | 1 | 0% | 2,393 | 4,918 | +106% | 0 | 0 | — |
case-10 | pass→pass | 8,553 | 8,834 | +3% | 1 | 1 | 0% | 692 | 2,115 | +206% | 0 | 0 | — |
case-11 | pass→pass | 14,546 | 6,906 | -53% | 1 | 1 | 0% | 1,839 | 2,774 | +51% | 0 | 0 | — |
case-12 | pass→pass | 15,291 | 17,029 | +11% | 1 | 1 | 0% | 2,618 | 3,505 | +34% | 0 | 0 | — |
case-13 | pass→pass | 15,339 | 2,916 | -81% | 1 | 1 | 0% | 2,148 | 1,847 | -14% | 0 | 0 | — |
case-14 | pass→pass | 10,084 | 8,451 | -16% | 1 | 1 | 0% | 1,846 | 2,989 | +62% | 0 | 0 | — |
case-15 | pass→pass | 3,485 | 9,355 | +168% | 1 | 1 | 0% | 658 | 2,144 | +226% | 0 | 0 | — |
case-16 | pass→pass | 11,355 | 16,512 | +45% | 1 | 1 | 0% | 2,053 | 3,569 | +74% | 0 | 0 | — |
case-17 | pass→pass | 20,835 | 17,656 | -15% | 1 | 1 | 0% | 2,657 | 4,735 | +78% | 0 | 0 | — |
case-18 | pass→pass | 14,008 | 7,436 | -47% | 1 | 1 | 0% | 1,594 | 2,724 | +71% | 0 | 0 | — |
case-19 | fail→pass | 5,318 | 4,672 | -12% | 1 | 1 | 0% | 1,036 | 2,162 | +109% | 0 | 0 | — |
case-20 | pass→pass | 17,905 | 10,699 | -40% | 1 | 1 | 0% | 2,288 | 3,393 | +48% | 0 | 0 | — |
case-21 | pass→pass | 12,918 | 16,845 | +30% | 1 | 1 | 0% | 2,583 | 3,785 | +47% | 0 | 0 | — |
case-22 | pass→pass | 9,589 | 16,361 | +71% | 1 | 1 | 0% | 1,935 | 3,166 | +64% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.