Skip to content
AI Dev Toolkit.
Esc
  • AI Token CounterCount tokens for GPT, Claude, Gemini, DeepSeek, Qwen and more.Tool
  • LLM API Cost CalculatorEstimate per-request, daily and monthly API costs.Tool
  • AI Model ComparisonCompare prices, context windows and features across models.Tool
  • AI Model Pricing PagesSpecs, real costs and cheaper alternatives for popular models.Tool
  • Context Window CheckerSee whether your text fits each model’s context window.Tool
  • Subscription vs API CalculatorFind out whether a chat plan or the API is cheaper for you.Tool
  • GPU / VRAM CalculatorCheck how much VRAM a local model needs and which GPUs fit.Tool
  • Prompt Caching CalculatorEstimate savings from prompt caching.Tool

API keys · Guide

How to get a free Groq API key

A free Groq API key takes a couple of minutes in the GroqCloud console, and Groq asks for a payment method only when you upgrade from its Free tier. Here’s how to get one, what the free limits are, and how to keep the key safe.

Cost
Free tier
Card needed
Only to upgrade
Free limit (gpt-oss)
1,000 requests a day
Key starts with
gsk_

Steps

Get your key

  1. Sign in or create an account at the GroqCloud console.
  2. Open the API keys page and create a key. Keys belong to the project you have selected, so pick the right project first.
  3. Give the key a name and copy it. Groq’s own examples show keys starting with gsk_. Store it somewhere safe, such as a password manager.
  4. Paste it into the box on this page to check it works and see which models it can use.
  5. Save it as the GROQ_API_KEY environment variable and make your first request (below).

Source: Groq’s quickstart.

Test your key

Sent only to api.groq.com, straight from your browser, never to this site. Kept in this tab’s memory until you clear it or leave the page. How keys are handled

One free request: it lists models and uses no tokens.

Your key goes from your browser straight to Groq, never to this site, and isn’t saved. Checking several keys or providers? Use the API key checker.

Free tier

What the free tier includes

Groq has a Free tier and a paid Developer tier. Moving up to the Developer tier needs a payment method (a credit card, US bank account or SEPA debit account); Groq’s billing FAQ asks for one only for that upgrade, and you can downgrade back to Free at any time.

  • Free plan limits (checked 2026-10-11): openai/gpt-oss-120b, openai/gpt-oss-20b and qwen/qwen3.8-27b each allow 30 requests a minute, 1,000 requests a day, 8,000 tokens a minute and 200,000 tokens a day. The Qwen model is a preview model, which Groq says shouldn’t be used in production. Your exact limits are on the limits page in the console.
  • Limits apply per organisation, not per user or key, so extra keys don’t add quota. Cached tokens don’t count towards them.
  • Not every model is on the free plan. Groq’s models page marks some, such as llama-3.3-70b-versatile, as Enterprise models; older tutorials still use them.
  • Your data: Groq says inference requests aren’t retained by default, but inputs and outputs may be logged for up to 30 days to troubleshoot errors or investigate abuse unless you opt out (or turn on Zero Data Retention) in Data Controls.
  • When you hit a limit the API returns a 429 error with a retry-after header giving the seconds to wait.

Use it

Call the API with your key

Save the key as an environment variable called GROQ_API_KEY; Groq’s Python and TypeScript SDKs read it by default. The API follows OpenAI’s format at https://api.groq.com/openai/v1, with the key in the Authorization header:

Terminal
curl https://api.groq.com/openai/v1/chat/completions -s \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GROQ_API_KEY" \
-d '{
  "model": "openai/gpt-oss-20b",
  "messages": [{
      "role": "user",
      "content": "Explain the importance of fast language models"
  }]
}'

This is the example from Groq’s API reference with the model changed to openai/gpt-oss-20b, which is on the free plan; the reference still uses llama-3.3-70b-versatile.

Security

Keep your key safe

  • Keep the key in an environment variable or a secrets manager, never in code you commit.
  • Groq says never to embed keys in frontend code or browser bundles; call the API from your own backend.
  • Use separate keys for development, staging and production, and rotate them regularly (Groq suggests, for example, quarterly).
  • If you think a key has leaked, revoke it on the API keys page, create a new one and review your usage logs.

FAQ

Frequently asked questions

Is the Groq API free?

Yes, within limits. Groq asks for a payment method only when you upgrade, and its Free tier includes models such as openai/gpt-oss-120b and openai/gpt-oss-20b at 30 requests a minute and 1,000 a day each (checked 2026-10-11). For higher limits, the Developer tier needs a credit card, US bank account or SEPA debit account and bills for what you use.

What are Groq’s free rate limits?

On the Free plan, the popular open models allow 30 requests a minute, 1,000 requests a day, 8,000 tokens a minute and 200,000 tokens a day each. Limits apply to your whole organisation, not each key, and cached tokens don’t count. The limits page in the GroqCloud console shows the exact numbers for your account.

Why doesn’t llama-3.3-70b-versatile work with my free key?

Groq’s models page now lists llama-3.3-70b-versatile and llama-3.1-8b-instant as Enterprise models, and they aren’t in the Free plan limits table, even though older tutorials and Groq’s own quickstart still use them. Use a free-plan model such as openai/gpt-oss-20b; the key checker on this page lists the models your key can use.

Is Groq the same as Grok?

No. Groq is a company that runs open models such as gpt-oss and Qwen on its own LPU chips, sold through GroqCloud at console.groq.com. Grok is xAI’s chatbot and model family, with its own separate API. A Groq key won’t work with xAI’s API, and the other way round.

Does Groq use my data?

Groq’s data page says inference requests aren’t retained by default, but inputs and outputs may be logged for up to 30 days to troubleshoot errors or investigate suspected abuse. You can opt out, or turn on Zero Data Retention, in the console’s Data Controls settings. Retained data is stored in Google Cloud buckets in the US.

What should I do if my Groq key leaks?

Revoke it on the API keys page in the GroqCloud console straight away, create a new key, and review your logs for usage you don’t recognise. Anyone with the key can use your organisation’s limits and, on the Developer tier, run up your bill.

Related

Keys for other providers