groq-common-errors
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".
What this skill does
# 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.
## Error Response Format
```json
{
"error": {
"message": "Rate limit reached for model `llama-3.3-70b-versatile`...",
"type": "tokens",
"code": "rate_limit_exceeded"
}
}
```
## Quick Diagnostic
```bash
set -euo pipefail
# 1. Verify API key is valid
curl -s https://api.groq.com/openai/v1/models \
-H "Authorization: Bearer $GROQ_API_KEY" | jq '.data | length'
# 2. Check specific model availability
curl -s https://api.groq.com/openai/v1/models \
-H "Authorization: Bearer $GROQ_API_KEY" | jq '.data[].id' | sort
# 3. Test a minimal completion
curl -s 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}' | jq .
```
## Error Reference
### 401 — Authentication Error
```
Authentication error: Invalid API key provided
```
**Causes**: Key missing, revoked, or malformed.
**Fix**:
```bash
# Verify key is set and starts with gsk_
echo "${GROQ_API_KEY:0:4}" # Should print "gsk_"
# Test key directly
curl -s -o /dev/null -w "%{http_code}" \
https://api.groq.com/openai/v1/models \
-H "Authorization: Bearer $GROQ_API_KEY"
# Should return 200
```
### 429 — Rate Limit Exceeded
```
Rate limit reached for model `llama-3.3-70b-versatile` in organization `org_xxx`
on tokens per minute (TPM): Limit 6000, Used 5800, Requested 500.
```
**Causes**: RPM (requests/min), TPM (tokens/min), or RPD (requests/day) limit hit.
**Rate limit headers returned**:
| Header | Description |
|--------|-------------|
| `retry-after` | Seconds to wait before retrying |
| `x-ratelimit-limit-requests` | Max requests per window |
| `x-ratelimit-limit-tokens` | Max tokens per window |
| `x-ratelimit-remaining-requests` | Requests remaining |
| `x-ratelimit-remaining-tokens` | Tokens remaining |
| `x-ratelimit-reset-requests` | When request limit resets |
| `x-ratelimit-reset-tokens` | When token limit resets |
**Fix**:
```typescript
import Groq from "groq-sdk";
async function handleRateLimit<T>(fn: () => Promise<T>): Promise<T> {
try {
return await fn();
} catch (err) {
if (err instanceof Groq.APIError && err.status === 429) {
const retryAfter = parseInt(err.headers?.["retry-after"] || "10");
console.warn(`Rate limited. Waiting ${retryAfter}s...`);
await new Promise((r) => setTimeout(r, retryAfter * 1000));
return fn(); // Single retry
}
throw err;
}
}
```
### 400 — Bad Request
```
Invalid parameter: model 'mixtral-8x7b-32768' is not available
```
**Causes**: Deprecated model ID, invalid parameters, or schema violation.
**Common deprecated model IDs**:
| Deprecated | Replacement |
|-----------|-------------|
| `mixtral-8x7b-32768` | `llama-3.1-8b-instant` or `llama-3.3-70b-versatile` |
| `gemma2-9b-it` | `llama-3.1-8b-instant` |
| `llama-3.1-70b-versatile` | `llama-3.3-70b-versatile` |
**Fix**: Check current models at [console.groq.com/docs/models](https://console.groq.com/docs/models) or call `GET /openai/v1/models`.
### 413 — Request Too Large
```
Maximum context length is 131072 tokens. However, your messages resulted in 140000 tokens.
```
**Fix**: Reduce prompt size or split into smaller requests. All current Llama models have 128K context.
### 500 / 503 — Server Errors
```
Internal server error / Service temporarily unavailable
```
**Causes**: Groq infrastructure issue, model overloaded.
**Fix**: Retry with backoff, fall back to a different model, check [status.groq.com](https://status.groq.com).
### SDK-Specific Errors
**TypeScript**:
```typescript
import Groq from "groq-sdk";
try {
await groq.chat.completions.create({ /* ... */ });
} catch (err) {
if (err instanceof Groq.APIError) {
console.error(`Status: ${err.status}, Message: ${err.message}`);
} else if (err instanceof Groq.APIConnectionError) {
console.error("Network error:", err.message);
} else if (err instanceof Groq.RateLimitError) {
console.error("Rate limited:", err.message);
} else if (err instanceof Groq.AuthenticationError) {
console.error("Auth failed:", err.message);
}
}
```
**Python**:
```python
from groq import Groq, APIError, RateLimitError, AuthenticationError
try:
client.chat.completions.create(...)
except RateLimitError as e:
print(f"Rate limited: {e.message}")
except AuthenticationError as e:
print(f"Auth error: {e.message}")
except APIError as e:
print(f"API error {e.status_code}: {e.message}")
```
## Escalation Path
1. Check [status.groq.com](https://status.groq.com) for ongoing incidents
2. Collect request ID from error response (`x-request-id` header)
3. Run `groq-debug-bundle` skill to gather diagnostics
4. Contact Groq support with request ID and debug bundle
## Resources
- [Groq Error Codes](https://console.groq.com/docs/errors)
- [Groq Rate Limits](https://console.groq.com/docs/rate-limits)
- [Groq Model Deprecations](https://console.groq.com/docs/deprecations)
- [Groq Status Page](https://status.groq.com)
## Next Steps
For comprehensive debugging, see `groq-debug-bundle`.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.