Groq Token Limits: LPU Quotas, Max Tokens, and Retrieval Architecture
A Groq token limit defines the maximum allowable input prompt tokens and completion tokens processed by Language Processing Units per API call. While models like Llama 3.3 70B support a 131,072-token context window, GroqCloud enforces separate limits across tokens per minute, requests per day, and maximum completion tokens. Decoupling high-speed LPU inference from bulk file storage using external retrieval allows agentic systems to scale without exhausting quota ceilings.
What Are Groq Token Limits and Context Windows?
Language Processing Units stream hundreds of tokens per second, but throwing multi-megabyte document context directly into a Groq API request crashes against strict per-minute token quotas within seconds. The bottleneck on GroqCloud is rarely latency; it is the mathematical ceiling where context windows, output token caps, and organizational rate limits intersect.
A Groq token limit defines the maximum allowable input prompt tokens and completion tokens processed by Language Processing Units per API call.
Groq processes machine learning workloads using custom Language Processing Units (LPUs). Unlike conventional graphics processing units that rely on external high-bandwidth memory (HBM), LPUs keep weights and active execution memory directly on-chip within static random-access memory (SRAM). This architecture yields predictable execution times and unprecedented generation speeds, typically between 300 and 1,000 tokens per second for leading open models.
However, physical SRAM capacity per chip is bounded. To maintain multi-tenant system stability and prevent memory starvation, GroqCloud applies strict architectural ceilings across two primary vectors: the maximum context window and maximum completion tokens. A developer reviewing open-weight checkpoints might notice that models like Meta Llama 3.3 70B advertise an expansive 131,072-token context window. While Groq accommodates that full context window for prompt ingestion on supported configurations, completion generation is constrained to a much tighter ceiling. For llama-3.3-70b-versatile, Groq enforces a hard output limit of 32,768 completion tokens per request. Attempting to generate a longer response results in mid-stream truncation.
The following table compares active production and preview models on GroqCloud, documenting their total context capacity, output token boundaries, and base developer quotas as of October 2026:
Understanding the distinction between input context and completion capacity is foundational for production engineering. The context window includes the sum of all system instructions, conversational history, retrieval context, tool definitions, and output tokens generated during that specific call. If an input prompt consumes 120,000 tokens on llama-3.3-70b-versatile, the model has only 11,072 tokens of remaining headroom before hitting the 131,072 total context cap, even though the architectural completion ceiling is 32,768 tokens.
Context Window versus Completion Headroom
Every inference call executes within an absolute budget governed by the formula: Total Tokens = Input Tokens + Output Tokens <= Context Window.
When building autonomous agents or automated data extraction pipelines, developers frequently conflate input capacity with generation length. If you load an agent with extensive system instructions, multiple OpenAPI tool specifications, and conversational turns, you systematically diminish the tokens available for the model to think, reason, and emit output.
For instance, when calling qwen/qwen3.8-27b, the maximum completion ceiling is 16,384 tokens. If your input prompt contains 125,000 tokens, the effective output ceiling drops to 6,072 tokens because the total context window of 131,072 tokens takes precedence. Conversely, if your prompt is only 2,000 tokens, the output remains constrained by the model's 16,384 completion ceiling. Client applications must monitor both boundaries to prevent unexpected stream termination.
Hardware SRAM Architecture and Inference Constraints
The technical rationale for these boundaries originates in Groq's Tensor Streaming Processor architecture. Conventional GPUs store model weights and key-value (KV) caches in high-capacity external dynamic RAM, communicating across memory buses that introduce memory bandwidth bottlenecks.
Groq LPUs eliminate off-chip memory latency by holding the active compute graph and KV caches entirely within on-chip SRAM. This design delivers deterministic execution times without memory bus contention. However, because on-chip memory is shared dynamically across concurrent execution streams, reserving memory buffers for massive output generations on large parameter checkpoints reduces concurrent batch density. Enforcing deliberate completion limits guarantees that high generation velocity remains stable across all active inference requests without causing memory fragmentation.
Related guides
- Mistral Token Limits: API Parameters, Generation Ceilings, and Workspace ArchitectureA Mistral token limit specifies the maximum number of tokens accepted in an API request payload or emitted during a...
- Custom GPT Token Limit: Instruction Limits, Context Windows, and RetrievalThe Custom GPT token limit refers to the 8,000-character constraint on configuration instructions and the dynamic...
- LiteLLM Max Tokens: Configuring Token Limits, Routing, and MCP StorageIn LiteLLM, max_tokens defines the upper limit of completion tokens generated per request or enforces a maximum budget...
- Google AI Studio Token Limits: Input, Output, and Generation BoundariesA Google AI Studio token limit defines the maximum input tokens and generation output tokens permitted for an...
- How to Handle Grok Token Limits and Process Large FilesThe Grok token limit restricts context capacity to 131,072 tokens on Grok 2, 500,000 tokens on Grok 4.5 and Grok 4.6,...
- How to Manage LangChain Token Limits: Memory, Pruning, and MCP WorkspacesUnderstanding the LangChain token limit helps developers prevent context overflow errors in complex LLM pipelines. This...
More on this subject: AI Agents: General Guides (172 guides)
Quota Dimensions: Tokens per Minute, Requests per Day, and 429 Mechanics
Beyond per-call context and completion caps, GroqCloud manages system throughput by enforcing quotas across multiple time horizons. Unlike per-seat developer platforms, Groq token limits operate at the organization level, aggregating usage across all API keys, team members, and integrated agent runtimes.
Groq enforces rate limits across organizations based on whichever quota threshold is reached first. Exceeding any single metric immediately triggers HTTP 429 Too Many Requests responses, halting downstream operations even if other quotas retain ample headroom.
Quotas are structured around five distinct metrics:
- Requests Per Minute (RPM): The total number of discrete API calls allowed within a rolling 60-second window.
- Requests Per Day (RPD): The aggregate volume of API calls permitted over a 24-hour UTC window.
- Tokens Per Minute (TPM): The cumulative count of input prompt tokens and output completion tokens processed within a rolling 60-second window.
- Tokens Per Day (TPD): The aggregate volume of combined tokens allowed across a full UTC calendar day.
- Input Tokens Per Minute (ITPM) and Output Tokens Per Minute (OTPM): Dedicated split metrics applied to specific models and organizational tiers to restrict prompt ingestion and token generation independently.
Under the entry tier, Groq allocates about 30 requests per minute and 14,400 requests per day on entry-level text models. On the free tier, token allocations scale dynamically based on model parameter size. For small models like llama-3.1-8b-instant, the free tier provides 6,000 TPM and 500,000 TPD. For heavier models like llama-3.3-70b-versatile, the free tier caps throughput at 12,000 TPM and 100,000 TPD. A single large document sent to Llama 3.3 70B can exhaust the entire minute's quota in a single request.
Understanding the ITPM and OTPM Split
Generating output tokens demands far more computational effort than processing input tokens. During prompt ingestion, an LPU processes prompt tokens in parallel across its execution pipelines. During completion generation, the hardware must perform sequential, autoregressive forward passes for every single generated token.
To balance this computational disparity, GroqCloud applies dedicated Output Tokens Per Minute (OTPM) constraints on select organizational tiers. While your combined TPM cap might show 250,000 tokens on a Developer plan, hovering over the quota display in the Groq Console may reveal an asymmetric allocation, such as 200,000 ITPM and 50,000 OTPM.
In an OTPM-constrained environment, an application that generates extensive prose or verbose synthetic code will encounter rate limits long before input token capacity is approached. Monitoring output generation density is therefore critical when sizing agent workloads.
HTTP Response Headers and Rate Limit Diagnostics
When an application queries the Groq API, every HTTP response includes informative diagnostic headers detailing current quota consumption. Production systems should inspect these headers on every response to modulate traffic before an error occurs:
x-ratelimit-limit-requests: The maximum number of requests allowed per day (RPD).x-ratelimit-limit-tokens: The maximum number of combined tokens allowed per minute (TPM).x-ratelimit-remaining-requests: The remaining request allowance within the current daily cycle.x-ratelimit-remaining-tokens: The remaining token budget available within the current minute window.x-ratelimit-reset-requests: The duration until the daily request quota resets, formatted in seconds or ISO duration.x-ratelimit-reset-tokens: The time remaining until the rolling per-minute token quota replenishes.
When an application breaches a quota threshold, Groq returns an HTTP 429 status code with a JSON payload specifying the failed dimension (for example, rate_limit_exceeded: TPM limit reached). A retry-after header indicates the exact number of seconds the client must pause before retrying.
Prompt caching plays an important role here. Groq automatically caches static prompt prefixes that exceed minimum token thresholds. Cached tokens do not count toward your per-minute or daily rate limits, allowing applications that share common system instructions across requests to preserve substantial quota headroom.
How to Configure Max Tokens in the Groq API
A widespread blind spot in production LLM deployment is the omitted or misconfigured max_tokens parameter. On slower, GPU-based cloud inference endpoints, text generation trickles at 20 to 50 tokens per second. If an application omits max_tokens, human developers or monitoring scripts usually notice runaway generation in flight and terminate the connection.
On Groq LPUs, where generation runs at 300 to 1,000 tokens per second, generation finishes in a fraction of a second. This velocity amplifies two distinct operational failures:
First, unexpected truncation occurs when client libraries apply low default token limits. For instance, several web frameworks default max_tokens to 1,024 or 2,048 tokens if left unspecified. At Groq's generation velocity, a structured JSON extraction, detailed architectural diagram, or multi-file code review hits that 1,024-token boundary almost instantly. The LPU halts generation cleanly, returning a status of 200 OK with finish_reason: "length". Downstream JSON parsers crash because the closing brackets were never emitted.
Second, unconstrained generation spirals can exhaust organizational quotas within seconds. If an autonomous agent enters a circular reasoning loop without an explicit token limit, the LPU will stream thousands of completion tokens in seconds. A handful of concurrent unconstrained agents will burn through a 50,000 OTPM quota in seconds, triggering immediate 429 errors across the entire organization.
Groq token limits regulate the maximum tokens processed per API request and per minute across an organization's workloads. Configuring the max_tokens parameter ensures completions finish cleanly without truncating early or exhausting per-minute LPU quotas.
To configure max_tokens properly in the Groq API, follow these four operational steps:
- Identify the completion ceiling of your chosen model from Groq's model catalog (such as 32,768 tokens for Llama 3.3 70B or 65,536 tokens for GPT OSS 120B).
- Set the
max_tokens(ormax_completion_tokens) parameter explicitly in your API request payload, sizing it to provide comfortable headroom above your expected output volume. - Check the
finish_reasonfield on every API response choice to confirm the model completed naturally (stop) rather than hitting the token cap (length). - Implement proactive retry mechanisms with exponential backoff and randomized jitter, reading the
x-ratelimit-reset-tokensheader when handling HTTP 429 responses.
Production Implementation Example with Python
Because Groq provides an OpenAI-compatible REST interface, developers can issue requests using standard HTTP libraries like requests or the official OpenAI client library by overriding the base URL to https://api.groq.com/openai/v1.
The following implementation illustrates structured error handling, explicit token budgeting, header tracking, and backoff pacing:
import os
import time
import requests
GROQ_API_URL = "https://api.groq.com/openai/v1/chat/completions"
GROQ_API_KEY = os.environ.get("GROQ_API_KEY")
def call_groq_with_budget(
prompt: str,
model: str = "llama-3.3-70b-versatile",
max_output_tokens: int = 4096,
max_retries: int = 3,
) -> str:
headers = {
"Authorization": f"Bearer {GROQ_API_KEY}",
"Content-Type": "application/json",
}
payload = {
"model": model,
"messages": [
{"role": "system", "content": "You are a technical assistant. Provide complete, valid JSON output."},
{"role": "user", "content": prompt}
],
"max_tokens": max_output_tokens,
"temperature": 0.2,
}
for attempt in range(max_retries):
response = requests.post(GROQ_API_URL, headers=headers, json=payload, timeout=30)
# Track remaining token quotas from response headers
remaining_tokens = response.headers.get("x-ratelimit-remaining-tokens")
reset_time = response.headers.get("x-ratelimit-reset-tokens")
if response.status_code == 200:
data = response.json()
choice = data["choices"][0]
finish_reason = choice.get("finish_reason")
if finish_reason == "length":
raise ValueError("Response was truncated because max_tokens was reached before completion.")
return choice["message"]["content"]
if response.status_code == 429:
retry_after = float(response.headers.get("retry-after", 2.0))
time.sleep(retry_after + 0.5)
continue
response.raise_for_status()
raise RuntimeError("Exceeded maximum retries due to persistent rate limiting.")
This pattern provides two safeguards: it raises an explicit error when a completion truncates due to token limits, and it pauses dynamically based on server feedback when encountering per-minute quota throttling.
Scale Groq Agent Workspaces Without Hitting Token Limits
Connect your AI agents to indexed, persistent workspaces through Fastio MCP. Keep full documents searchable while passing only concise excerpts to high-speed LPUs. Monthly plans start with a 14-day free trial.
Why Context Stuffing Fails on LPU Inference Engines
When developers encounter context windows reaching 131,072 tokens on Llama 3.3 70B, the initial architectural instinct is often context stuffing: reading entire folders of PDFs, codebase repositories, or compliance manuals and appending them directly into the system prompt.
While this approach works for isolated offline experiments, it breaks down quickly in production systems running on Groq LPUs.
Consider the arithmetic of context stuffing against Groq token limits:
- Quota Exhaustion: Suppose an enterprise agent attaches three 15-page contracts to every query, consuming 35,000 input tokens. On Groq's free tier, where Llama 3.3 70B carries a 12,000 TPM limit, that single request fails immediately. Even on a paid Developer plan with a 250,000 TPM quota, running just seven concurrent agent queries burns through the entire minute's allocation in parallel, forcing all subsequent requests into 429 backoff queues.
- Economic Waste: Sending 35,000 tokens on every conversational turn means paying input token fees repeatedly for static reference information that rarely changes between turns.
- Attention Degradation: Even with advanced attention architectures, stuffing tens of thousands of tokens into an LLM context creates 'lost in the middle' effects, where the model struggles to retrieve specific factual clauses located deep within voluminous input prompts.
The structural remedy is to treat the LLM context window as volatile working memory rather than persistent document storage. Just as high-performance computing architectures separate high-speed CPU cache from secondary storage, agentic architectures must decouple real-time inference from persistent document stores. Building out dedicated storage for agents provides clean separation between active reasoning and static knowledge.
Evaluating Traditional Storage Options for AI Agents
To decouple storage from context, engineering teams typically evaluate several common storage mechanisms, each presenting distinct tradeoffs:
- Local Filesystems: Storing reference documents on local developer machines or ephemeral container disks works during development. However, local files cannot be accessed by distributed agents, lack multi-tenant permissions, and provide no native search capabilities for remote models.
- Commodity Cloud Storage (Dropbox, Box, OneDrive): Traditional cloud storage services excel at backing up human office files and syncing desktop folders. However, they were engineered for human document collaboration rather than autonomous agent operations. They lack built-in semantic retrieval, require separate API orchestration, and offer no native Model Context Protocol (MCP) servers to allow agents to search content directly.
- Standalone Vector Databases: Setting up dedicated vector infrastructure provides fast vector similarity search. However, it introduces considerable architectural complexity: engineering teams must write custom document parsers, manage chunking algorithms, generate and store vector embeddings, handle document update synchronizations, and pay separate database hosting bills.
For agentic teams building on high-speed inference engines like Groq, what is needed is a unified Fastio workspace where documents live, update, and index automatically, exposing standard tool interfaces that agents can query on demand.
Implementing External Workspace Retrieval with Fastio MCP
Fastio provides an intelligent workspace platform designed specifically for agentic teams and human collaborators. Rather than forcing developers to build and maintain complex document indexing pipelines, Fastio workspaces serve as a shared, persistent knowledge substrate with integrated Fastio AI features.
When files are uploaded to an organization workspace with Intelligence Mode enabled, Fastio automatically indexes their contents in the cloud. Multi-page PDFs, spreadsheets, Word documents, presentations, and scanned files are immediately searchable using hybrid retrieval that combines lexical keyword matching with semantic vector search.
AI agents running on Groq connect to Fastio workspaces through the Model Context Protocol (MCP), an open standard for tool integration. Instead of dragging multi-megabyte files into Groq prompts, the agent queries the workspace over MCP, retrieves only the 300 to 500 tokens of relevant text required to answer the query, and submits only that targeted excerpt to the LPU.
This architecture resolves the Groq token limit dilemma:
- The input prompt sent to Groq remains compact, keeping prompt overhead low and preserving room for multi-turn conversational context.
- Per-minute TPM and OTPM quotas remain preserved, allowing hundreds of concurrent agent requests without triggering HTTP 429 errors.
- Reference documents remain persistent, centralized, and version-controlled on Fastio AI storage, accessible to human team members and autonomous agents alike.
Connecting Agents via Remote Streamable HTTP MCP
Connecting an agent framework, developer tool, or custom script to Fastio takes only minutes. Fastio hosts a remote MCP server over Streamable HTTP, eliminating the need to run local bridge processes or install separate bridge packages.
Use the canonical MCP server address matching your client environment:
- Claude apps, OpenClaw, and general MCP clients:
https://mcp.fast.io/mcp/tools - ChatGPT and Codex custom servers:
https://mcp.fast.io/mcp/operations(or install the Fastio plugin directly from the ChatGPT plugin directory) - Coding agents (Cursor, Claude Code, Cline, Gemini CLI):
https://mcp.fast.io/mcp/code - Custom agent code and automation frameworks: Use
/mcp/toolsfor named tool calls (storage,storage_manage), or/mcp/codefor unified search and execution.
For headless agents and automated pipelines, authenticate by passing your scoped Fastio API key as an Authorization: Bearer <api key> header on the Streamable HTTP connection. Complete instructions are detailed in the Fastio MCP setup guide, with complete tool actions cataloged in the Fastio MCP tool reference.
When the agent requires documentation, it issues an action-based tool call to the Fastio MCP endpoint:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "storage",
"arguments": {
"action": "search",
"workspace_id": "ws_enterprise_knowledge",
"query": "LPU rate limit backoff requirements and retry-after header parsing"
}
}
}
The Fastio MCP server returns top-ranked document passages complete with source file names and section references. The agent appends these concise excerpts to its conversation history and submits the prompt to Groq, completing inference in milliseconds.
Workspace Governance, Version History, and Subscription Plans
In enterprise production environments, data governance is as essential as inference speed. Fastio workspaces are organization-owned, ensuring that data structures and access privileges remain intact when team members transition.
Every file stored in a workspace maintains complete per-file version history. When documentation changes, Fastio updates the retrieval index automatically while preserving prior file versions for historical auditing. Workspace activity is recorded in a detailed activity log, giving administrators complete visibility into what actions were taken and which agents or human members performed them.
Teams can sync existing cloud folders from Google Drive, Dropbox, Box, and OneDrive on a schedule or on demand. Furthermore, teams can collaborate directly on documentation using Collaborative Notes, or generate structured database views from unstructured files using Metadata Views (document data extraction). When finalized deliverables need to be shared externally, administrators can create branded share links (Send, Receive, or Exchange) with custom expiration controls and download restrictions.
Monthly plans start with a 14-day free trial, which requires a credit card. Creating an account is free; doing real work requires an organization on a paid subscription. Transparent subscription tiers are detailed on the Fastio pricing page:
Credits meter AI work only. Storage beyond the plan is $0.015 per GB a month and extra bandwidth $0.04 per GB, billed in money.
By combining Fastio's persistent, indexed storage with Groq's high-velocity LPU inference, development teams can build scalable, context-aware AI systems that never stall on token quotas.
Sources
References used to verify factual claims in this guide.
-
Under the entry tier, Groq allocates about 30 requests per minute and 14,400 requests per day on entry-level text models.
-
Groq enforces rate limits across organizations based on whichever quota threshold is reached first.
Frequently Asked Questions
What is the token limit on Groq?
A Groq token limit varies by model and subscription tier. Context windows for flagship models like Llama 3.3 70B and Llama 3.1 8B reach 131,072 tokens, while MiniMax M2.7 supports 196,608 tokens. However, Groq enforces separate ceilings on maximum completion tokens, capping Llama 3.3 70B at 32,768 output tokens and Qwen 3.8 27B at 16,384 output tokens. Organization-level throughput is further governed by per-minute and daily token limits.
How many tokens per minute does Groq allow?
Tokens per minute (TPM) allowances depend on your plan and target model. On the free tier, Groq allocates 6,000 TPM for Llama 3.1 8B and 12,000 TPM for Llama 3.3 70B. On the paid Developer plan, standard base quotas expand to 250,000 TPM across primary models, with custom enterprise provisioning available for larger production workloads. Groq also enforces separate input (ITPM) and output (OTPM) constraints on select organizational configurations.
How to configure max tokens in Groq API calls?
Configure max tokens by including the max_tokens or max_completion_tokens parameter in your JSON request payload sent to https://api.groq.com/openai/v1/chat/completions. Set the integer value to match your required generation size without exceeding the model's completion ceiling (such as 32,768 tokens for Llama 3.3 70B). Always inspect the returned finish_reason attribute to verify whether the response completed normally (stop) or truncated due to your token budget (length).
What causes HTTP 429 Too Many Requests errors on Groq?
HTTP 429 errors occur whenever an organization breaches any of Groq's rate limit thresholds, including requests per minute (RPM), requests per day (RPD), tokens per minute (TPM), tokens per day (TPD), or output tokens per minute (OTPM). Groq evaluates all metrics concurrently and triggers a 429 on whichever threshold is reached first. The response includes a retry-after header and rate limit diagnostic headers indicating when the quota window resets.
Does prompt caching reduce Groq token limit consumption?
Yes. Groq automatically caches static prompt prefixes that meet internal length thresholds. When a request matches an active prompt cache, the cached tokens do not count toward your per-minute or daily token rate limits. This significantly reduces rate limit pressure for applications that reuse large system instructions or static tool schemas across multiple requests.
How does Groq handle input tokens versus output tokens?
Groq processes input prompt tokens in parallel across LPU execution pipelines, whereas output completion tokens require sequential autoregressive generation passes. Because generation consumes more compute resources per token, GroqCloud monitors output tokens more stringently and may apply separate Output Tokens Per Minute (OTPM) caps. Output tokens also cost more per million tokens than input tokens across all hosted models.
Related Resources
Scale Groq Agent Workspaces Without Hitting Token Limits
Connect your AI agents to indexed, persistent workspaces through Fastio MCP. Keep full documents searchable while passing only concise excerpts to high-speed LPUs. Monthly plans start with a 14-day free trial.