Groq’s API (GroqCloud) is known for one thing above all: speed. It serves open models such as OpenAI’s gpt-oss on its own LPU inference hardware, and it has a free tier that’s generous enough for prototypes, hobby projects and testing.
It’s also OpenAI-compatible, so most code written for the OpenAI SDK works with a two-line change.
This guide shows how to get a Groq API key, which models you can use on the free tier in November 2026, the free tier rate limits, how to call the API with the Groq Python SDK and the OpenAI SDK, speech-to-text with Whisper, text-to-speech, the Batch API, and fixes for common errors. It follows Groq’s official docs (console.groq.com/docs).
Quick note: Groq (with a q) is an AI inference company. It is not Grok, the xAI chatbot. If you’re looking for Grok, see our Grok vs ChatGPT comparison.
- Get a key: console.groq.com/keys, then set
GROQ_API_KEY. - Install:
pip install groq, or use the OpenAI SDK with base URLhttps://api.groq.com/openai/v1. - Free models:
openai/gpt-oss-20b,openai/gpt-oss-120b, Whisper, plus preview models. - Free limits (gpt-oss): 30 requests/min, 1,000 requests/day, 8K tokens/min, 200K tokens/day.
- Big change: Llama 3.1 8B and 3.3 70B became enterprise-only on 16 Aug 2026.
- Batch API: 50% cheaper, 24 hours to 7 days turnaround.
What Groq and GroqCloud Are
- Groq builds custom inference chips (LPUs) designed to generate tokens very quickly.
- GroqCloud is its developer platform: an API, a web playground and a console for keys, usage and limits.
- Business news: in December 2025 Nvidia signed a large, non-exclusive licensing deal for Groq’s inference technology, and some Groq leaders moved to Nvidia. Groq stayed an independent company and kept GroqCloud running, and it raised new funding in 2026.
For developers, what matters is that the API, keys and docs still live at console.groq.com.
How to Get a Groq API Key
- Sign up at console.groq.com with email, Google or GitHub.
- Open API Keys (console.groq.com/keys).
- Click Create API Key, give it a name and copy it straight away. You won’t see it again.
- Save it as an environment variable:
# macOS / Linux export GROQ_API_KEY="your-key-here" # Windows PowerShell setx GROQ_API_KEY "your-key-here" - Never commit the key to Git or paste it into front-end code. Use a
.envfile or your host’s secrets manager.
Getting keys for other providers too? See how to get an OpenAI API key, how to get a Gemini API key and how to get a Claude API key.
Groq Models in November 2026
| Model ID | Type | Status |
|---|---|---|
openai/gpt-oss-120b |
Chat / reasoning | Production |
openai/gpt-oss-20b |
Chat / reasoning (faster) | Production |
whisper-large-v3 |
Speech to text | Production |
whisper-large-v3-turbo |
Speech to text (faster) | Production |
llama-3.1-8b-instant, llama-3.3-70b-versatile |
Chat | Enterprise only since 16 Aug 2026 |
qwen/qwen3.8-27b |
Chat | Preview |
minimaxai/minimax-m2.7 |
Chat | Preview |
openai/gpt-oss-safeguard-20b |
Safety classifier | Preview |
canopylabs/orpheus-v1-english |
Text to speech | Preview |
The text models listed have a 131K-token context window. Preview models can change or disappear at short notice, so use production models for anything important.
Old tutorials will break: many guides use llama-3.3-70b-versatile or llama-3.1-8b-instant. Groq’s deprecations page says both were retired for free and Developer accounts on 16 August 2026, with openai/gpt-oss-120b and openai/gpt-oss-20b as replacements. Llama 4 Scout/Maverick, Kimi K2, qwen3-32b and the compound models were also shut down earlier in 2026.
Free Tier Rate Limits
| Model | Requests/min | Requests/day | Tokens/min | Tokens/day |
|---|---|---|---|---|
| gpt-oss-120b, gpt-oss-20b, qwen3.8-27b | 30 | 1,000 | 8,000 | 200,000 |
| gpt-oss-safeguard-20b | 3 | 1,000 | 2,000 | 200,000 |
| Whisper large-v3 / turbo | 20 | 2,000 | – | – |
| Orpheus TTS | 10 | 100 | 1,200 | 3,600 |
- Whisper is also limited to 7,200 audio seconds per hour and 28,800 per day.
- Limits apply per organization, not per key, so creating more keys doesn’t raise them.
- Cached tokens don’t count toward the limits.
- Going over a limit returns HTTP
429 Too Many Requests. - Your exact current limits are shown in the console under Settings > Limits; check there, as Groq adjusts them.
Call Groq With Python
- Install the SDK:
pip install groq - Make sure
GROQ_API_KEYis set in your environment. - Run a first request:
import os from groq import Groq client = Groq(api_key=os.environ.get("GROQ_API_KEY")) chat = client.chat.completions.create( model="openai/gpt-oss-20b", messages=[ {"role": "system", "content": "You are a concise assistant."}, {"role": "user", "content": "Explain what an LPU is in two sentences."}, ], ) print(chat.choices[0].message.content) - Stream tokens by adding
stream=Trueand looping over the chunks.
Groq’s quickstart example still shows a Llama model, so swap in openai/gpt-oss-20b if you’re on the free tier.
Use the OpenAI SDK With Groq
Already using the OpenAI Python library? Point it at Groq:
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.groq.com/openai/v1",
api_key=os.getenv("GROQ_API_KEY"),
)
r = client.chat.completions.create(
model="openai/gpt-oss-120b",
messages=[{"role": "user", "content": "Give me 3 blog title ideas about local AI."}],
)
print(r.choices[0].message.content)
Groq’s OpenAI compatibility page lists a few differences:
| Parameter | Behaviour on Groq |
|---|---|
logprobs, logit_bias, top_logprobs |
Not supported |
messages[].name |
Not supported |
n |
Must be 1 |
temperature=0 |
Converted to 1e-8 |
Transcription response_format |
vtt and srt not available |
The same base URL works in most tools that accept a custom OpenAI endpoint, such as Open WebUI or agent frameworks. Building agents? See our OpenAI Agents SDK guide.
Speech to Text and Text to Speech
Transcribe audio with Whisper:
from groq import Groq
client = Groq()
with open("meeting.mp3", "rb") as f:
t = client.audio.transcriptions.create(
file=("meeting.mp3", f.read()),
model="whisper-large-v3-turbo",
)
print(t.text)
Text to speech uses the Orpheus models through POST https://api.groq.com/openai/v1/audio/speech, with voices such as troy, hannah and austin, returning WAV audio. These models are in preview.
Prefer to keep audio on your own machine? See how to run Whisper locally and our Kokoro TTS guide.
Batch API and Paid Plans
- Developer plan: add billing in the console to unlock higher rate limits, plus Batch and Flex processing. You pay per token for what you use.
- Batch API: 50% off normal prices, with a completion window you choose from 24 hours to 7 days. It doesn’t stack with prompt caching discounts.
- Batch endpoints: chat completions, audio transcriptions and audio translations.
- Batch input: a
.jsonlfile of up to 50,000 lines and 200 MB. - Enterprise: committed-spend contracts, which are now the only way to use the Llama 3.x models.
Per-token prices are listed in the GroqCloud console and change over time, so check them there before you estimate costs. gpt-oss-20b is the cheapest and fastest of the production chat models.
Tips for Building on Groq
- Retry on 429. Add exponential backoff so short bursts over the free limit don’t crash your app.
- Pin a production model. Avoid preview models in apps users depend on, since they can be removed quickly.
- Watch the deprecations page. Groq retires models regularly; subscribe to updates so a model ID doesn’t break overnight.
- Keep prompts lean. The free tier’s 8K tokens per minute fills up fast with long system prompts.
- Use Batch for bulk jobs. Summarising thousands of documents overnight costs half as much.
Groq vs Other APIs and Local Models
| Groq | Gemini API free tier | Local (Ollama) | |
|---|---|---|---|
| Cost to start | Free tier | Free tier | Free (your hardware) |
| Speed | Very fast | Fast | Depends on your GPU |
| Models | Open models (gpt-oss, Qwen, Whisper) | Google’s Gemini models | Any open model you can fit |
| Privacy | Cloud | Cloud | Fully local |
| Best for | Fast prototypes, voice apps | Multimodal apps | Private, offline work |
Compare with our Gemini API free tier guide, or run gpt-oss on your own PC with the Ollama API.
Troubleshooting
| Error | Likely cause | Fix |
|---|---|---|
| 401 Invalid API Key | Key missing, mistyped or deleted | Check GROQ_API_KEY; create a new key |
| 404 or “model decommissioned” | Using a retired model such as llama-3.3-70b-versatile | Switch to openai/gpt-oss-120b or openai/gpt-oss-20b |
| 429 Too Many Requests | Free tier limit reached | Wait, add retries with backoff, or upgrade to the Developer plan |
| 400 on logprobs or n>1 | Unsupported OpenAI parameter | Remove it (see the compatibility table) |
| Request too large | Prompt over the tokens-per-minute limit | Shorten the prompt or split the job |
| Transcription format error | vtt/srt requested | Use json, verbose_json or text |
| Code works with OpenAI but not Groq | Wrong base URL | Use https://api.groq.com/openai/v1 |
FAQ
Is the Groq API free?
Yes, there’s a free tier with rate limits, for example 30 requests per minute and 1,000 per day on gpt-oss models.
Is Groq the same as Grok?
No. Groq is an AI inference company with its own chips and API. Grok is xAI’s chatbot.
Can I still use Llama 3.3 70B on Groq?
Not on free or Developer accounts. It became enterprise-only on 16 August 2026; Groq recommends gpt-oss-120b instead.
Is Groq compatible with the OpenAI API?
Mostly. Set the base URL to https://api.groq.com/openai/v1. A few parameters such as logprobs aren’t supported.
What is Groq’s API base URL?
https://api.groq.com/openai/v1 for OpenAI-compatible calls.
Does Groq support speech to text?
Yes, with whisper-large-v3 and whisper-large-v3-turbo.
How do I get more Groq rate limits?
Add billing to move to the Developer plan, or contact Groq about enterprise plans.



