Groq
Call open models on GroqCloud through its OpenAI-compatible API, use batch and flex processing, set organization spend limits and model permissions, wire it into clients and a LiteLLM gateway, and clean up files, batches and keys.
Scope: the GroqCloud API platform: chat, Responses API, speech, tools, structured outputs, service tiers, Batch API and Files API, LoRA inference (Enterprise), projects, spend limits, data controls. There are no self-serve dedicated deployments or CLI to tear down; the cleanup is files, batches, fine-tunes and keys. Out of scope: cross-provider choice (cloud-llms), gateway design (llm-gateway), self-hosted engines (self-hosted-llms).
Work through the steps in order. Load a reference only when a step names it. Docs were read on 2026-10-11; Groq's model list changes often, so list models from the API instead of trusting examples.
Discover first
Every command is read-only and never prints a secret.
env | cut -d= -f1 | grep -iE 'groq|openai_(api|base)'
# Does the key work, and which models can it call (key stays in the header)
curl -s https://api.groq.com/openai/v1/models -H "Authorization: Bearer $GROQ_API_KEY" | jq -r '.data[].id'
# Resources that persist or bill
curl -s https://api.groq.com/openai/v1/batches -H "Authorization: Bearer $GROQ_API_KEY" | jq -r '.data[]? | [.id,.status] | @tsv'
curl -s https://api.groq.com/openai/v1/files -H "Authorization: Bearer $GROQ_API_KEY" | jq -r '.data[]? | [.id,.purpose,.filename] | @tsv'
curl -s https://api.groq.com/v1/fine_tunings -H "Authorization: Bearer $GROQ_API_KEY" | jq .
Current rate limits and the spend limit are console pages: https://console.groq.com/settings/limits and https://console.groq.com/settings/billing/limits. Response headers x-ratelimit-* show remaining capacity on each call.
Decision flow
- Interactive or agent traffic, low latency:
on_demand tier (default). See references/api-and-features.md.
- High throughput that tolerates occasional failures:
service_tier: "flex" (paid, higher limits, may return 498 capacity_exceeded) or "auto".
- Offline bulk work, higher limits, discounted: Batch API. See
references/batch-and-lora.md.
- Fine-tuned behavior: Groq runs pre-made LoRA adapters only (Enterprise); it does not fine-tune. Train elsewhere (
fine-tuning-llms). See references/batch-and-lora.md.
- Need dedicated GPUs, a model Groq does not host, or custom serving: Groq is not the tool; see
choosing-llm-hosting and self-hosted-llms.
- Always set the spend limit and project structure before traffic:
references/limits-and-spend.md.
Rules
- Ask before creating billable or retained resources. Batches, files, LoRA adapters and plan upgrades need approval. Batch input and output files are retained for 30 days unless deleted.
- Secrets never touch output. Read
GROQ_API_KEY from the environment or a 0600 file. Never print or commit it.
- Pin versions. Pin model IDs (they get retired and renamed) and SDK versions; keep a fallback alias.
- Budget controls before traffic. Set a monthly spend limit on a paid plan. It is organization-wide, not per key, and spend updates lag 10 to 15 minutes.
- Use projects. One project and key per environment or workload gives separate rate limits, keys and visibility.
- Verify features per model. Strict structured outputs, prompt caching, parallel tool use and built-in tools differ by model; check the model page.
- Always clean up. Delete batch files, fine-tunes you no longer need and unused keys; verify by listing.
Workflows
Account and key setup
Call the API
Batch
Connect to LiteLLM and clients
Limits, spend and cost
Tear down
Troubleshoot
Reference index
references/setup-and-auth.md: console, projects, keys, roles, SDKs.
references/api-and-features.md: OpenAI compatibility, Responses API, service tiers, tools, structured outputs, reasoning, caching.
references/batch-and-lora.md: Batch and Files APIs, LoRA inference and the fine-tunings API.
references/limits-and-spend.md: rate limits and headers, spend limits, model permissions, data controls.
references/litellm-and-clients.md: LiteLLM entries and SDK configuration.
references/teardown.md: cleaning up files, batches, fine-tunes and keys.
references/troubleshooting.md: symptoms, causes and fixes.
Companion skills
cloud-llms: cross-provider workflow and cost model. Install: npx skills add ScaleDockHQ/llm-skills --skill cloud-llms.
llm-gateway: LiteLLM-style gateway, fallbacks and budgets. Install: npx skills add ScaleDockHQ/llm-skills --skill llm-gateway.
llm-evals: check quality against your current model. Install: npx skills add ScaleDockHQ/llm-skills --skill llm-evals.
llm-observability: traces and per-request cost. Install: npx skills add ScaleDockHQ/llm-skills --skill llm-observability.
llm-clients: SDK and client wiring. Install: npx skills add ScaleDockHQ/llm-skills --skill llm-clients.
fine-tuning-llms: train adapters before uploading them. Install: npx skills add ScaleDockHQ/llm-skills --skill fine-tuning-llms.
choosing-llm-hosting and self-hosted-llms: when you need GPUs you control. Install: npx skills add ScaleDockHQ/llm-skills --skill choosing-llm-hosting.
1---2name: groq3description: Use GroqCloud for fast open-model inference - OpenAI-compatible chat, Responses API, tools, structured outputs, batch, flex tier, LoRA. Use when asked about Groq, GroqCloud, api.groq.com, GROQ_API_KEY, console.groq.com, `groq/` LiteLLM models, service_tier, `blocked_api_access`, 429 or 498 `capacity_exceeded`, Groq batch jobs, spend limits, or ZDR and data controls. Groq has no dedicated-GPU product to deploy. For cross-provider choice use cloud-llms or choosing-llm-hosting.4license: MIT5compatibility: Any OS with bash, curl and jq. No official Groq CLI exists in the docs; use curl or the groq and OpenAI SDKs. Needs a Groq API key in an env var or 0600 file. Batch, flex and spend limits need a paid plan; LoRA and Prometheus metrics need Enterprise. Ask before enabling paid features.6metadata:7 source: https://skillmd.com/skills/scaledockhq/groq8 author: ScaleDockHQ9 version: "0.1.0"10---1112# Groq1314Call open models on GroqCloud through its OpenAI-compatible API, use batch and flex processing, set organization spend limits and model permissions, wire it into clients and a LiteLLM gateway, and clean up files, batches and keys.1516**Scope:** the GroqCloud API platform: chat, Responses API, speech, tools, structured outputs, service tiers, Batch API and Files API, LoRA inference (Enterprise), projects, spend limits, data controls. There are no self-serve dedicated deployments or CLI to tear down; the cleanup is files, batches, fine-tunes and keys. Out of scope: cross-provider choice (`cloud-llms`), gateway design (`llm-gateway`), self-hosted engines (`self-hosted-llms`).1718Work through the steps in order. Load a reference only when a step names it. Docs were read on 2026-10-11; Groq's model list changes often, so list models from the API instead of trusting examples.1920## Discover first2122Every command is read-only and never prints a secret.2324```bash25env | cut -d= -f1 | grep -iE 'groq|openai_(api|base)'2627# Does the key work, and which models can it call (key stays in the header)28curl -s https://api.groq.com/openai/v1/models -H "Authorization: Bearer $GROQ_API_KEY" | jq -r '.data[].id'2930# Resources that persist or bill31curl -s https://api.groq.com/openai/v1/batches -H "Authorization: Bearer $GROQ_API_KEY" | jq -r '.data[]? | [.id,.status] | @tsv'32curl -s https://api.groq.com/openai/v1/files -H "Authorization: Bearer $GROQ_API_KEY" | jq -r '.data[]? | [.id,.purpose,.filename] | @tsv'33curl -s https://api.groq.com/v1/fine_tunings -H "Authorization: Bearer $GROQ_API_KEY" | jq .34```3536Current rate limits and the spend limit are console pages: https://console.groq.com/settings/limits and https://console.groq.com/settings/billing/limits. Response headers `x-ratelimit-*` show remaining capacity on each call.3738## Decision flow39401. Interactive or agent traffic, low latency: `on_demand` tier (default). See `references/api-and-features.md`.412. High throughput that tolerates occasional failures: `service_tier: "flex"` (paid, higher limits, may return 498 `capacity_exceeded`) or `"auto"`.423. Offline bulk work, higher limits, discounted: Batch API. See `references/batch-and-lora.md`.434. Fine-tuned behavior: Groq runs pre-made LoRA adapters only (Enterprise); it does not fine-tune. Train elsewhere (`fine-tuning-llms`). See `references/batch-and-lora.md`.445. Need dedicated GPUs, a model Groq does not host, or custom serving: Groq is not the tool; see `choosing-llm-hosting` and `self-hosted-llms`.456. Always set the spend limit and project structure before traffic: `references/limits-and-spend.md`.4647## Rules4849- **Ask before creating billable or retained resources.** Batches, files, LoRA adapters and plan upgrades need approval. Batch input and output files are retained for 30 days unless deleted.50- **Secrets never touch output.** Read `GROQ_API_KEY` from the environment or a 0600 file. Never print or commit it.51- **Pin versions.** Pin model IDs (they get retired and renamed) and SDK versions; keep a fallback alias.52- **Budget controls before traffic.** Set a monthly spend limit on a paid plan. It is organization-wide, not per key, and spend updates lag 10 to 15 minutes.53- **Use projects.** One project and key per environment or workload gives separate rate limits, keys and visibility.54- **Verify features per model.** Strict structured outputs, prompt caching, parallel tool use and built-in tools differ by model; check the model page.55- **Always clean up.** Delete batch files, fine-tunes you no longer need and unused keys; verify by listing.5657## Workflows5859### Account and key setup6061- [ ] Create a key at https://console.groq.com/keys inside the right project. Save to a 0600 file. -> `references/setup-and-auth.md`62- [ ] Upgrade to a paid plan only with approval (needed for batch, flex, spend limits).63- [ ] Verify: the models call above returns IDs.6465### Call the API6667- [ ] OpenAI SDK with `base_url="https://api.groq.com/openai/v1"` or the `groq` SDK. -> `references/api-and-features.md`68- [ ] Choose a tier with `service_tier`; add tools or `response_format` json_schema.6970### Batch7172- [ ] JSONL, upload with `purpose=batch`, create with `completion_window`, poll, download, delete files. -> `references/batch-and-lora.md`7374### Connect to LiteLLM and clients7576- [ ] `groq/<model>` with `GROQ_API_KEY`. -> `references/litellm-and-clients.md`7778### Limits, spend and cost7980- [ ] Set the monthly limit and alerts; review model permissions. -> `references/limits-and-spend.md`8182### Tear down8384- [ ] Follow `references/teardown.md`: batches, files, fine-tunes, keys, spend backstop.8586### Troubleshoot8788- [ ] `references/troubleshooting.md` (400 `blocked_api_access`, 429 headers, 498, 403 model blocked).8990## Reference index9192- `references/setup-and-auth.md`: console, projects, keys, roles, SDKs.93- `references/api-and-features.md`: OpenAI compatibility, Responses API, service tiers, tools, structured outputs, reasoning, caching.94- `references/batch-and-lora.md`: Batch and Files APIs, LoRA inference and the fine-tunings API.95- `references/limits-and-spend.md`: rate limits and headers, spend limits, model permissions, data controls.96- `references/litellm-and-clients.md`: LiteLLM entries and SDK configuration.97- `references/teardown.md`: cleaning up files, batches, fine-tunes and keys.98- `references/troubleshooting.md`: symptoms, causes and fixes.99100## Companion skills101102- `cloud-llms`: cross-provider workflow and cost model. Install: `npx skills add ScaleDockHQ/llm-skills --skill cloud-llms`.103- `llm-gateway`: LiteLLM-style gateway, fallbacks and budgets. Install: `npx skills add ScaleDockHQ/llm-skills --skill llm-gateway`.104- `llm-evals`: check quality against your current model. Install: `npx skills add ScaleDockHQ/llm-skills --skill llm-evals`.105- `llm-observability`: traces and per-request cost. Install: `npx skills add ScaleDockHQ/llm-skills --skill llm-observability`.106- `llm-clients`: SDK and client wiring. Install: `npx skills add ScaleDockHQ/llm-skills --skill llm-clients`.107- `fine-tuning-llms`: train adapters before uploading them. Install: `npx skills add ScaleDockHQ/llm-skills --skill fine-tuning-llms`.108- `choosing-llm-hosting` and `self-hosted-llms`: when you need GPUs you control. Install: `npx skills add ScaleDockHQ/llm-skills --skill choosing-llm-hosting`.