Install
openclaw skills install groq-apiBuild and debug Groq API chat and speech workflows with low-latency routing, structured outputs, and production-safe patterns.
openclaw skills install groq-apiOn first use, read setup.md for activation preferences, credential verification, and default workflow setup.
User needs to build, integrate, or troubleshoot Groq API inference for chat, tool calling, or speech transcription. Agent handles request shaping, model routing, failure recovery, and safe production patterns.
Memory lives in ~/groq-api/. See memory-template.md for structure.
~/groq-api/
├── memory.md # Status, activation preference, and defaults
├── requests/ # Reusable payload snippets
├── logs/ # Optional debug snapshots
└── experiments/ # Prompt/model A-B notes
Use these files as decision aids, not as static docs: pick the smallest file that resolves the current blocker.
| Topic | File |
|---|---|
| Setup process | setup.md |
| Memory template | memory-template.md |
| Request patterns | api-patterns.md |
| Model routing | model-selection.md |
| Failures and recovery | troubleshooting.md |
Check GROQ_API_KEY first and use Authorization: Bearer $GROQ_API_KEY for every request. Use https://api.groq.com/openai/v1 as the base URL and confirm access with /models.
curl -s https://api.groq.com/openai/v1/models \
-H "Authorization: Bearer $GROQ_API_KEY" | jq '.data[0].id'
Begin with small prompts and explicit format instructions. Add complexity only after the baseline call is stable.
Use separate model choices for:
Choose from live /models output instead of hardcoding assumptions.
For 429 and 5xx, retry with exponential backoff and capped attempts. If a model is overloaded, fail over to a compatible backup model and log the swap.
If output feeds code execution or data writes, enforce JSON schema or strict parsing before acting. Reject malformed output early.
Speech uploads have different failure modes than chat. Validate input format, check file size, and surface transcription confidence when available.
Never store API keys in files. Keep request logs sanitized and avoid persisting full sensitive prompts unless the user explicitly asks.
/models and select available IDs at runtime.429 backoff guidance -> repeated failures under load.All network traffic should be limited to these Groq endpoints for explicit inference tasks requested by the user.
| Endpoint | Data Sent | Purpose |
|---|---|---|
| https://api.groq.com/openai/v1/models | None (GET) | Discover available models |
| https://api.groq.com/openai/v1/chat/completions | Prompt messages and options | Chat completions |
| https://api.groq.com/openai/v1/audio/transcriptions | Audio file and transcription params | Speech-to-text |
No other data is sent externally.
Data that leaves your machine:
Data that stays local:
~/groq-api/memory.md~/groq-api/logs/This skill does NOT:
GROQ_API_KEY in project files~/groq-api/ for persistenceBy using this skill, prompts and optional audio content are sent to Groq. Only install if you trust Groq with that data.
Install with clawhub install <slug> if user confirms:
api — reusable REST patterns, auth, and error handlingmodels — model comparison and selection heuristicsai — current AI landscape checks before implementation decisionsfine-tuning — adaptation workflows when prompting is not enoughlangchain — orchestration patterns for multi-step LLM pipelinesclawhub star groq-apiclawhub sync