Groq API (December 2026): API key, free tier and model prices
Groq API guide: free plan limits, how to get a Groq API key, and per-model prices from $0.17 per million tokens (gpt-oss-20b). Plus how Groq differs from Grok.
The Groq API is GroqCloud's OpenAI-compatible API for fast inference on open models. You get a key free at console.groq.com/keys, the Free plan costs $0 with low rate limits, and paid usage starts at $0.17 per million input tokens and $0.36 per million output tokens (openai/gpt-oss-20b). The flagship openai/gpt-oss-120b costs $0.33 input and $0.71 output.
Groq is not Grok. Groq makes its own inference chips (it calls them LPUs) and serves other companies' open models. Grok is xAI's model, sold through a separate API covered in our Grok API guide. Prices below are from Groq's models page on December 4, 2026. The old groq.com/pricing address now redirects to Groq's home page, so the models page is where current prices live.
Groq API pricing per model
Production models (Groq says these are fit for production use):
| Model ID | Input per 1M tokens | Output per 1M tokens | Speed (tokens/sec) | Context |
|---|---|---|---|---|
openai/gpt-oss-120b | $0.33 | $0.71 | 500 | 131,072 |
openai/gpt-oss-20b | $0.17 | $0.36 | 1,000 | 131,072 |
whisper-large-v3 | $0.111 per hour of audio | |||
whisper-large-v3-turbo | $0.04 per hour of audio | |||
llama-3.1-8b-instant | Enterprise only, contact sales | 560 | 131,072 | |
llama-3.3-70b-versatile | Enterprise only, contact sales | 280 | 131,072 |
Preview models (for evaluation; Groq warns they can be discontinued at short notice):
| Model ID | Price | Speed (tokens/sec) | Context |
|---|---|---|---|
qwen/qwen3.8-27b | $0.80 input, $4.00 output per 1M tokens | 450 | 131,072 |
openai/gpt-oss-safeguard-20b | $0.17 input, $0.36 output per 1M tokens | 1,000 | 131,072 |
meta-llama/llama-prompt-guard-2-22m | $0.03 input, $0.03 output per 1M tokens | 512 | |
meta-llama/llama-prompt-guard-2-86m | $0.04 input, $0.04 output per 1M tokens | 512 | |
canopylabs/orpheus-v1-english (text to speech) | $22.00 per 1M characters | 4,000 | |
canopylabs/orpheus-arabic-saudi (text to speech) | $40.00 per 1M characters | 4,000 | |
minimaxai/minimax-m2.7 | Enterprise only, contact sales | 260 | 196,608 |
meta-models/muse-spark-open | Enterprise only, contact sales | 350 | 131,072 |
If you are reading an older guide, the numbers will look different. Groq's own changelog from October 2025 quotes gpt-oss-120b input at $0.15 per million tokens, and the Llama models that used to anchor Groq's free tier were shut down for Free and Developer users on August 16, 2026. Qwen 3 32B and Llama 4 Scout went on July 17, 2026, Qwen 3.6 27B on September 14, and the Compound systems on September 21.
Groq discounts: batch, caching and flex
- Batch API: 50% off. Submit a file of requests and get results within a 24-hour to 7-day window. Batch runs on
gpt-oss-20b,gpt-oss-120band Whisper (plus the Llama models for Enterprise), and does not count against your standard rate limits. The batch discount does not stack with caching. - Prompt caching: 50% off cached input. Automatic, with no code changes, on
gpt-oss-20b,gpt-oss-120bandgpt-oss-safeguard-20b. Cached prefixes expire after 2 hours without use. Ongpt-oss-120bthat makes cached input $0.165 per million tokens. - Flex processing: same price, 10x the rate limits. Paid plans only. Requests fail fast with a
498 capacity_exceedederror when flex capacity runs out, so add retries with backoff.
Groq plans: Free, Developer and Enterprise
| Free | Developer | Enterprise | |
|---|---|---|---|
| Price | $0 | Pay per token | Custom |
| Rate limits | Base limits (below) | Higher (below) | Scalable capacity |
| Batch and Flex | No | Yes | Yes |
| Spend limits | No | Yes | Yes |
| Audit logs | No | 7-day retention | 90-day retention |
| Support | Community | Chat | Dedicated |
| Other | LoRA inference, SSO and SCIM, Enterprise-only models |
Groq free tier limits
Groq's rate limits page publishes this table of base limits:
| Model | Requests/min | Requests/day | Tokens/min | Tokens/day |
|---|---|---|---|---|
openai/gpt-oss-120b | 30 | 1,000 | 8,000 | 200,000 |
openai/gpt-oss-20b | 30 | 1,000 | 8,000 | 200,000 |
qwen/qwen3.8-27b | 30 | 1,000 | 8,000 | 200,000 |
openai/gpt-oss-safeguard-20b | 3 | 1,000 | 2,000 | 200,000 |
| Llama Prompt Guard 2 (22M and 86M) | 30 | 14,400 | 15,000 | 500,000 |
| Orpheus text to speech (both) | 10 | 100 | 1,200 | 3,600 |
| Whisper (both) | 20 | 2,000 | 7,200 audio seconds/hour | 28,800 audio seconds/day |
The page's wording calls these the base limits for the Developer plan, but they are far below the Developer limits on Groq's models page, and Groq's billing page points to this same table for Free plan limits. Treat them as the starting limits for a new account, and check the Limits page in your console for your organization's exact numbers. Limits apply to the whole organization, not to each key.
Developer plan limits listed on the models page:
| Model | Developer plan limits |
|---|---|
gpt-oss-120b, gpt-oss-20b, qwen3.8-27b | 1,000 requests and 250,000 tokens per minute |
gpt-oss-safeguard-20b | 1,000 requests and 150,000 tokens per minute |
whisper-large-v3 | 300 requests per minute, 200,000 audio seconds per hour |
whisper-large-v3-turbo | 400 requests per minute, 400,000 audio seconds per hour |
| Orpheus text to speech | 250 requests and 50,000 tokens per minute |
When you hit a limit, the API returns 429 Too Many Requests with a retry-after header. Every response also carries x-ratelimit-remaining-requests (per day) and x-ratelimit-remaining-tokens (per minute), so you can slow down before you hit the wall.
How to get a Groq API key
- Sign in at console.groq.com and open the API keys page to create a key.
- Store it as an environment variable:
export GROQ_API_KEY=<your-api-key-here>. - Install the SDK:
pip install groqfor Python, orpnpm add ai @ai-sdk/groqfor the Vercel AI SDK. - Send a request. Groq's quickstart still shows
llama-3.3-70b-versatile, which is now Enterprise-only, so use a current model instead:
import os
from groq import Groq
client = Groq(api_key=os.environ.get("GROQ_API_KEY"))
chat_completion = client.chat.completions.create(
messages=[{"role": "user", "content": "Explain the importance of fast language models"}],
model="openai/gpt-oss-120b",
)
print(chat_completion.choices[0].message.content)
Using the OpenAI SDK with Groq
The API is mostly OpenAI-compatible. Point the OpenAI client at Groq's base URL:
import os
import openai
client = openai.OpenAI(
base_url="https://api.groq.com/openai/v1",
api_key=os.environ.get("GROQ_API_KEY"),
)
Groq also supports the Responses API. A few OpenAI fields return a 400 error: logprobs, logit_bias, top_logprobs and messages[].name, and n must be 1. A temperature of 0 is converted to 1e-8.
Worked example: a monthly Groq bill for a small startup
Say a 10-person startup runs a classification and summarization pipeline on gpt-oss-120b: 500,000 requests a month, each with 1,500 input tokens and 300 output tokens. That is 750M input tokens and 150M output tokens.
- Standard: 750 × $0.33 + 150 × $0.71 = $247.50 + $106.50 = $354.00 a month
- With caching: if 1,000 tokens of every prompt are a shared prefix that hits the cache, input becomes 500 × $0.165 + 250 × $0.33 = $82.50 + $82.50 = $165.00, so the total is $165.00 + $106.50 = $271.50
- Batch (50% off, no caching discount): $354.00 × 0.5 = $177.00, if the work can wait up to 24 hours
- On
gpt-oss-20binstead: 750 × $0.17 + 150 × $0.36 = $127.50 + $54.00 = $181.50
Rate limits are not the problem here: 500,000 requests a month averages about 12 requests per minute, well under the Developer plan's 1,000. On the Free plan's 1,000 requests a day, the same pipeline would stall after about 30,000 requests a month.
Groq vs Grok: what is the difference?
People mix up the names constantly, and the products have nothing to do with each other.
| Groq | Grok (xAI) | |
|---|---|---|
| What it is | Inference provider running other companies' open models on its own LPU hardware | xAI's own model family |
| API endpoint | api.groq.com/openai/v1 | api.x.ai/v1 |
| Key variable | GROQ_API_KEY | XAI_API_KEY |
| Main models | gpt-oss-120b, gpt-oss-20b, Qwen 3.8 27B, Whisper | Grok 4.7, Grok 4.3 |
| Flagship price per 1M tokens | $0.33 input, $0.71 output (gpt-oss-120b) | $2.00 input, $6.00 output (Grok 4.7) |
| Free API tier | Yes, with low limits | No; prepaid credits required |
| Startup program | None that we could find | Grok for Startups, no investor required |
Pick Groq when you want very fast, cheap inference on open models. Pick Grok when you want xAI's frontier models. Our Grok API guide covers xAI's prices, key setup and startup credits.
Which Groq plan should you pick?
- Prototyping or a hackathon: Free. It covers testing, not real traffic.
- Any production workload: Developer. You pay only for tokens, and it adds Batch, Flex, spend limits and per-minute limits about 30 times higher on the chat models.
- You need Llama, MiniMax M2.7 or Muse Spark Open, LoRA adapters, SSO or guaranteed capacity: Enterprise, through Groq's sales team.
How startups pay less for Groq
Groq does not publish a startup credit program that we could find, and there is none in our directory. What works instead:
- Batch everything that can wait. Half price on supported models.
- Structure prompts for caching. Put fixed instructions and tool definitions first; cached input is half price and does not count toward rate limits.
- Start on
gpt-oss-20b. It is about half the price ofgpt-oss-120band twice as fast by Groq's figures. Move up only where quality needs it. - Set a spend limit on day one so a runaway loop cannot surprise you.
- Compare hosts for the same open model. Together AI lists
gpt-oss-120Bat $0.15 input and $0.60 output, and its Startup Accelerator gives up to $15K in credits to selected startups that have raised up to $5M. Baseten for Startups gives up to $2,500 for Model APIs by direct application, and OpenRouter for Startups gives up to $3K usable across providers with a partner referral.
Together AITogether AI Startup AcceleratorUp to $15K / $30K / $50K in free platform credits plus 3–10 hours of forward-deployed engineering, by amount raisedApply directly$50K
BasetenBaseten for StartupsUp to $25,000 in credits for Dedicated Deployments or Training and up to $2,500 for Model APIsApply directly$28K
OpenRouterOpenRouter for StartupsUp to $3,000 in universal inference credits plus 0% processing fees (platform and BYOK) for 12 monthsNeeds an investor$3K
For every free inference option in one place, see our free LLM API guide.
Questions
Is the Groq API free?
Yes, up to a point. GroqCloud's Free plan costs $0 and is meant for building and testing, with low per-minute and per-day limits. For production traffic, Batch, Flex processing and spend limits you need the pay-per-token Developer plan.
Is Groq the same as Grok?
No. Groq is an inference company that runs open models such as gpt-oss and Qwen on its own LPU hardware, at api.groq.com. Grok is xAI's model family, served from api.x.ai. Groq does not host Grok models.
Can I still use Llama models on Groq?
Only on Enterprise. Groq shut down llama-3.1-8b-instant and llama-3.3-70b-versatile for Free and Developer users on August 16, 2026 and recommends openai/gpt-oss-20b and openai/gpt-oss-120b instead. Both Llama models are still listed for Enterprise customers through sales.
Do cached tokens count toward Groq rate limits?
No. Groq says cached tokens do not count toward your rate limits, though they are subtracted after processing, so many large parallel requests can still hit a limit. Cached input on supported models is billed at a 50% discount.
How do I cap my Groq spending?
On a paid plan, an organization owner can go to Settings, Billing, Limits and add a monthly limit with email alerts. Spend updates every 10 to 15 minutes, so you can overshoot slightly, and once you hit the cap every key in the organization gets a blocked_api_access error until the 1st of the next month.
Programs in this guide
Together AITogether AI Startup AcceleratorUp to $15K / $30K / $50K in free platform credits plus 3–10 hours of forward-deployed engineering, by amount raisedApply directly$50K
BasetenBaseten for StartupsUp to $25,000 in credits for Dedicated Deployments or Training and up to $2,500 for Model APIsApply directly$28K
OpenRouterOpenRouter for StartupsUp to $3,000 in universal inference credits plus 0% processing fees (platform and BYOK) for 12 monthsNeeds an investor$3K
xAI (SpaceX Super Intelligence)Grok for StartupsCredits across Grok, Grok Build, Grok Bot and the Grok API from one balance; initial credits on approval with more unlocked after onboarding (amount not published)Apply directlyUnpublished
Sources
- console.groq.com/docs/models
- console.groq.com/docs/rate-limits
- console.groq.com/settings/billing/plans
- console.groq.com/docs/quickstart
- console.groq.com/docs/openai
- console.groq.com/docs/batch
- console.groq.com/docs/prompt-caching
- console.groq.com/docs/flex-processing
- console.groq.com/docs/spend-limits
- console.groq.com/docs/changelog
- groq.com
- docs.grok.com/developers/pricing
- together.ai/pricing
Related guides
- AI credits for startups: every free AI credit program (2026)
Free AI credits for startups from OpenAI, Anthropic, xAI, Google, GPU clouds, voice APIs and vector DBs. Which need a VC and which you can apply for directly.
- DeepSeek API pricing (December 2026): every model and token price
DeepSeek API pricing: deepseek-flash costs $0.30 per million input tokens and $1.20 output at peak, half off-peak. V4 Pro prices, caching and a monthly bill.
- Free LLM APIs in December 2026: every real free tier and its limits
The free LLM APIs that still work in December 2026: Gemini, OpenRouter free models, Groq and Cloudflare Workers AI, with published limits and the catch on each.
- Grok API (December 2026): key, pricing and free xAI credits
Grok 4.7 costs $2 per million input tokens and $6 output on the xAI API. How to get a key, every model price, rate limits, and how to get free Grok API credits.