Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jeremylongshore/groq-cost-tuning
Optimize Groq costs through model routing, token management, and usage monitoring.
Passed 18 of 21 test cases with the skill, and 11 of 21 without it.
and 8 more in the full report
7 fixed12 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
We need to structure our daily spend reporting function that aggregates tracked token usage. What exact key names must be present in the returned summary object?
| Checked | Without skill | With skill |
|---|---|---|
| Includes totalCost property in report object | Missed | Passed |
| Includes byModel property in report object | Missed | Passed |
The instructions your model reads when the skill loads.
Optimize Groq inference costs through smart model routing, token minimization, and caching. Groq pricing is already extremely competitive, but at high volume the savings from routing classification to 8B vs 70B are 12x per request.
GROQ_API_KEY environment variable — the groq-sdk client reads it automatically (new Groq()).groq-sdk package installed (npm install groq-sdk).| Model | Input | Output |
|---|---|---|
llama-3.1-8b-instant | ~$0.05 | ~$0.08 |
llama-3.3-70b-versatile | ~$0.59 | ~$0.79 |
llama-3.3-70b-specdec | ~$0.59 | ~$0.99 |
meta-llama/llama-4-scout-17b-16e-instruct | ~$0.11 | ~$0.34 |
whisper-large-v3-turbo | ~$0.04/hr | — |
Check current pricing at groq.com/pricing.
Apply these six levers in order. Each compounds on the last — routing alone is the biggest win (~12x), and caching plus batching halve the remainder. The lean skeleton below shows the routing core; the full code for every step lives in references/implementation.md.
llama-3.1-8b-instant; reasoning/code review/chat → llama-3.3-70b-versatile; vision → llama-4-scout).max_tokens so a one-word answer never bills for a paragraph.temperature: 0, hash identical prompts into a cache for zero-cost, zero-latency repeat hits.import Groq from "groq-sdk";
test cases passed, vs 11 / 21 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.