Groq Token Counter & Pricing (2026)
Groq runs other people's models on chips nobody else makes. The Groq API serves Llama 4, Llama 3.3 70B, and the GPT-OSS family on its LPU silicon at 280 to 1,000 tokens per second — the fastest public inference tier in 2026. The "groq token" you see in your usage bill is counted by the upstream model's tokenizer, not a Groq-specific engine. And Groq pricing on the open-weight lineup is published per million tokens, with no monthly minimum on the Developer tier.
What changed since the last publish: Llama 3.1 8B Instant and Llama 3.3 70B Versatile are now Enterprise tier on Groq's public rate card — contact sales for the live per-million rate. The currently-published per-token lineup on Groq Cloud is GPT-OSS 120B / 20B plus preview slots for Llama 4 Maverick / Scout. Llama pricing below uses the Bedrock-resale anchor that the Token Calculator ships in data/models.json, because that's the verifiable number we can stand behind. All token counts verified against models.json on 2026-08-28.
Where Groq Stands in 2026
Groq is not a model lab. The company builds the LPU — Language Processing Unit — a deterministic systolic-array chip where every cycle is scheduled at compile time. GPUs (H100, B200) were built for graphics and adapted for training; the LPU was built for one job: serving tokens back to a user who is waiting on the response. In production traffic that shows up as 280–1,000+ tok/sec on Llama 3.3 70B and GPT-OSS 20B, versus roughly 40–80 tok/sec on a typical GPU-backed endpoint serving the same weights.
The second fact worth pinning down: Groq hosts other people's open-weight models — Meta's Llama family, Mistral's Mixtral, Google's Gemma, Alibaba's Qwen, OpenAI's GPT-OSS — and exposes them through an OpenAI-compatible endpoint at https://api.groq.com/openai/v1. Swap the base_url, change the model ID, your existing OpenAI client code keeps working. That is the architectural reason Groq's pricing can undercut closed labs: it is renting silicon, not amortizing a training run.
The third point, and the one most teams miss: because the models are third-party, Groq tokens are upstream tokens. Llama 3.3 70B bills in Meta's SentencePiece BPE vocabulary (128K entries). GPT-OSS models bill in OpenAI's o200k_base. Groq does not define its own tokenizer, and the token count returned in usage.prompt_tokens is the same count you'd see running the same model on Bedrock, Together, or your own GPU. That is why a Llama tokenizer running locally (via Hugging Face transformers.js or the Xenova/Llama-3.3-70B-Instruct weights) will agree with Groq's server-side count to the token.
Groq Models & Pricing
The Token Calculator ships the open-weight Llama lineup under provider: "meta-llama" with prices anchored to the AWS Bedrock reseller rate card, which is the most reliably-published USD figure for these models. Below is the slice that matters for Groq buyers in 2026.
| Model | Input $/MTok | Output $/MTok | Context | Batch | Verified |
|---|---|---|---|---|---|
| Llama 4 Maverick | $0.24 | $0.97 | 1M | $0.12 / $0.485 | 2026-08-28 |
| Llama 4 Scout | $0.17 | $0.66 | 10M | $0.085 / $0.33 | 2026-08-28 |
| Llama 3.3 70B Instruct | $0.72 | $0.72 | 128K | $0.36 / $0.36 | 2026-08-28 |
| GPT-OSS 120B (Groq Cloud) | $0.15 | $0.60 | 131K | — | per Groq docs |
| GPT-OSS 20B (Groq Cloud) | $0.075 | $0.30 | 131K | — | per Groq docs |
Sources: data/models.json entries llama-4-maverick, llama-4-scout, llama-3-3-70b-instruct; Groq Cloud rate card at console.groq.com/docs/models for GPT-OSS.
The headline read: input tokens on Llama 4 Scout run $0.17/MTok, output runs $0.66/MTok. That is roughly 1/15 the input cost of GPT-4o at $2.50/MTok and 1/7 the 70B rate of two years ago. For input-heavy workloads (RAG over long documents, summarization, classification) the Scout price is the lever that matters. For output-heavy workloads (long-form generation, verbose JSON, chain-of-thought), Llama 4 Maverick's $0.97 output is the better comparison point — it is still less than 1/10 of GPT-4o's $10.00 output rate.
A practical note on Enterprise tier: Groq moved Llama 3.1 8B Instant and Llama 3.3 70B Versatile to "Contact Sales" pricing in 2026. Third-party trackers still cite $0.05/$0.08 for the 8B and $0.59/$0.79 for the 70B from earlier in 2026, but those numbers are no longer on the live Groq rate card. If your production plan depends on those rates, get a written quote — the public Bedrock-resale anchor for Llama 3.3 70B is $0.72/$0.72, which is a defensible fallback for budgeting even if Groq's own contract lands elsewhere.
How to Count Groq Tokens
Groq reports usage.prompt_tokens and usage.completion_tokens in the standard OpenAI response shape — same fields, same semantics, no Groq-specific math. The number you see is the number Groq bills.
For Llama models, the upstream tokenizer is Meta's SentencePiece BPE with a 128K-entry vocabulary. Run it locally with Hugging Face's transformers library:
import { AutoTokenizer } from '@huggingface/transformers';
const tok = await AutoTokenizer.from_pretrained('Xenova/Llama-3.3-70B-Instruct');
const ids = await tok.encode('How many tokens is this sentence?');
// ids.length is what Groq will bill as prompt_tokens
For a Llama 4 model, swap the hf_tokenizer_id to meta-llama/Llama-4-Maverick or meta-llama/Llama-4-Scout and the same code path works. The Token Calculator's data/tokenizers/hf.js does exactly this — it routes every meta-llama model to its native BPE tokenizer and reports the count back to the UI.
For GPT-OSS models, the tokenizer is OpenAI's o200k_base. Use tiktoken locally:
import tiktoken from 'tiktoken';
const enc = tiktoken.encoding_for_model('gpt-4o'); // o200k_base
const tokens = enc.encode('How many tokens is this sentence?');
Quick heuristic for offline estimation: English text compresses to roughly 1 token per 4 characters on Llama BPE, and roughly 1 token per 3.7 characters on o200k_base. Code with descriptive variable names compresses better (closer to 1 token per 3 characters). Non-Latin scripts and emojis compress worse — 2 to 4 tokens per character depending on the script. These are ballpark numbers, not contracts; for any number you plan to bill against, send a single low-stakes request and read usage back.
One quirk: because Groq is OpenAI-API-compatible, libraries built for OpenAI work without code changes. The tiktoken estimate you compute locally will match Groq's server-side count only for GPT-OSS (same tokenizer). For Llama models it will be close but not identical, because the Llama BPE and o200k_base split the same text at different boundaries. For the most reliable pre-count, send one cheap request and multiply by your expected monthly request count.
Real Bill Examples
Sticker rates are easy to forget. Below are four concrete workloads priced against the table above.
Example 1: Customer-support classifier, 10,000 conversations/month on Llama 4 Scout. Each conversation averages 500 input tokens and 200 output tokens. Input: 5,000,000 × $0.17 = $0.85. Output: 2,000,000 × $0.66 = $1.32. Total: $2.17/month. For comparison, the same workload on Llama 3.3 70B at $0.72/$0.72 runs $5.00 + $0.72 = $5.72/month — 2.6× the Scout rate. Scout's 1M context window also means you can stuff the entire product knowledge base into the system prompt without paying the long-context premium some closed labs charge past 128K.
Example 2: Long-document summarization, 1,000 documents/month at 50K tokens each. Each document produces a 1,500-token summary. On Llama 4 Maverick at $0.24/$0.97: input = 50,000,000 × $0.24 = $12.00. Output = 1,500,000 × $0.97 = $1.46. Total: $13.46/month. On Llama 3.3 70B at $0.72/$0.72: $36.00 + $1.08 = $37.08/month. The input differential drives 90% of the gap — when your workload is mostly input, the cheaper input model wins by a wide margin. If you can run Scout on this workload instead of Maverick (and Scout's 10M context fits the document size with room to spare), the bill drops further to $8.50 + $0.99 = $9.49/month.
Example 3: Real-time autocomplete, 1 million completions/month. Each completion averages 50 input tokens (recent context window) and 30 output tokens. On Llama 4 Scout at $0.17/$0.66: input = 50,000,000 × $0.17 = $8.50. Output = 30,000,000 × $0.66 = $19.80. Total: $28.30/month. Speed is the case for Groq specifically here, not price — at 1,000 tok/sec on GPT-OSS 20B, a 30-token completion returns in roughly 30ms, which is fast enough for keystroke-streaming autocomplete with no visible lag. A 50 tok/sec GPU-backed endpoint returns the same 30 tokens in ~600ms, which feels broken in a typing UX.
Example 4: Code-review agent, 500 reviews/month. 8,000 input tokens (the diff plus surrounding context) and 2,500 output tokens (the review comment). On Llama 4 Maverick at $0.24/$0.97: input = 4,000,000 × $0.24 = $0.96. Output = 1,250,000 × $0.97 = $1.21. Total: $2.17/month. On Llama 3.3 70B at $0.72/$0.72: $2.88 + $0.90 = $3.78/month. The Maverick pricing is the strongest case for "use a newer model when you can" — same general capability tier, 43% lower bill. Quality is competitive but not identical to GPT-4o; benchmark your specific task before migrating wholesale.
The pattern across all four: input cost dominates. When your workload is mostly reading (RAG, classification, summarization), the cheapest input rate wins. When your workload is mostly writing (autocomplete, generation, agentic tool-use), output cost matters more and you should compare on output rate, not input.
Frequently Asked Questions
What is Groq and how is it different from other AI providers? Groq is a US AI infrastructure company that builds the LPU (Language Processing Unit), a chip optimized for LLM inference. Unlike OpenAI or Anthropic, Groq does not train foundation models — it hosts other companies' open-weight releases (Llama, Mixtral, Gemma, GPT-OSS) on LPU silicon and exposes them through an OpenAI-compatible API. The pitch is speed: 280–1,000+ tok/sec in production, versus 40–80 tok/sec on typical GPU-backed endpoints.
How much does the Groq API cost in 2026? Groq pricing on the open-weight Llama 4 lineup runs $0.17–$0.24 input / $0.66–$0.97 output per million tokens (Bedrock-resale anchor in data/models.json). GPT-OSS on Groq Cloud runs $0.075–$0.15 input / $0.30–$0.60 output per million. Llama 3.1 8B Instant and Llama 3.3 70B Versatile have moved to Enterprise tier — contact Groq sales for those rates. The Developer tier is pay-as-you-go with no monthly minimum; cached tokens do not count toward rate limits.
Does Groq have a free tier? Yes. Every account at console.groq.com gets API access without a credit card, capped at 30 requests per minute, 6,000 tokens per minute, and 14,400 requests per day per organization. The limits apply at the org level — creating multiple API keys does not multiply the quota. Adding a payment card unlocks the Developer tier (roughly 10× the limits). Cached tokens do not consume rate-limit budget, which is a real benefit if you have stable system prompts.
What is a Groq token? A groq token is a token from the upstream model's tokenizer — Meta's SentencePiece BPE for Llama models (128K-entry vocabulary), OpenAI's o200k_base for GPT-OSS models. Groq does not define its own tokenizer. The token count in usage.prompt_tokens is the same count you'd see running the model on Bedrock or any other host. Rough heuristic: 1 token per 4 characters of English on Llama BPE; 1 token per 3.7 characters on o200k_base.
Where do I check current Groq API prices? The authoritative source is console.groq.com/docs/models for the live rate card and console.groq.com/docs/rate-limits for current free-tier and Developer-tier limits. Groq updates pricing as new models ship and as older ones move to Enterprise; the Llama anchor numbers in this guide are from data/models.json verified 2026-08-28 against the AWS Bedrock reseller rate card, which is the most stable public USD figure for the open-weight Llama lineup.
Sources
- AI Token Calculator data/models.json — verified 2026-08-28, entries llama-4-maverick, llama-4-scout, llama-3-3-70b-instruct. USD per 1M tokens, sourced from AWS Bedrock reseller pricing.
- Groq Cloud Models — console.groq.com/docs/models. Live rate card for GPT-OSS 120B / 20B and Enterprise tier on Llama 3.1 8B Instant / Llama 3.3 70B Versatile.
- Groq Cloud Rate Limits — console.groq.com/docs/rate-limits. Free-tier and Developer-tier request/min, tokens/min, requests/day caps at the org level.
- Hugging Face transformers.js — Xenova/Llama-3.3-70B-Instruct tokenizer weights for offline Llama BPE counting; meta-llama/Llama-4-Maverick and meta-llama/Llama-4-Scout for the Llama 4 family.
- OpenAI tiktoken — o200k_base encoding used by GPT-OSS models and GPT-4o/5.x. Available via tiktoken.encoding_for_model('gpt-4o').