---
title: "Groq API Key: How to Create One in GroqCloud (2026)"
description: "Create a Groq API key in the GroqCloud console under API Keys, and no credit card is required for the free plan. You'll be ready to make your first call."
url: https://www.activepieces.com/blog/groq-api-key-how-to-create-one-in-groqcloud-2026
updated: 2026-12-05
---

> Every page on www.activepieces.com is available as markdown: add `.md` to the URL, or send `Accept: text/markdown`. Site index: https://www.activepieces.com/llms.txt

# Groq API Key: How to Create One in GroqCloud (2026)

By Ingrid Kovarová · December 5, 2026 · 15 min read · Filed under [Automation tutorials](https://www.activepieces.com/blog/category/automation-tutorials)

**Summary**

Groq API keys are created free in GroqCloud's console API Keys section and need no payment card.

- Free tier rate limits run from 1,000 to 14,400 requests daily.
- Llama 3.1 8B instant model allows the highest limit of 14,400.
- Paid gpt-oss-20b model costs $0.17 input and $0.36 output per million tokens.

You create a Groq API key in the GroqCloud console under API Keys, and **the free plan works without a card**.

## Groq API key: create one free in GroqCloud

Name the key, copy it once, and store it where one named person owns it, such as the shared vault your team already uses for the credentials behind [Activepieces](https://www.activepieces.com) flows. [Groq's quickstart](https://console.groq.com/docs/quickstart) documents the same steps.

A Groq API key is a secret token, created in the GroqCloud console, that authenticates your requests to Groq's hosted models and ties their usage and rate limits to your account.

1. Sign in to the GroqCloud console at console.groq.com with a new or existing account.
2. Open the API Keys page at console.groq.com/keys.
3. Choose Create API Key.
4. Give it a name that says what it is for, such as the service and environment. A name like "test" tells the person on call at 2am nothing about what broke.
5. Submit, then copy the key straight away. The console shows the full value once, so if you didn't copy the key, you must replace it, not recover it.
6. Put the key in an environment variable or a secrets manager, not in the source file.

![A browser window on the API Keys page of the GroqCloud console, showing a list of key rows and a Create API Key button at…](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/0581e9ea-b617-40c9-8a50-b29cd10c574a/groq-api-key-how-to-create-one-in-groqcloud-2026-98c269af.webp)

Expect to hit limits, because the free key is a shared door. [Groq reports](https://groq.com/blog/thank-you-1m-developers-building-with-groqcloud) that GroqCloud had 70,000 developers early on, then 356,000, then 1 million, and now 5 million.

![GroqCloud developer count at each announced milestone](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/187c5daf-1a98-4d6f-b35d-c00fbebb84d8/groq-api-key-how-to-create-one-in-groqcloud-2026-dc8863db.svg "Source: Groq")

Millions of people drawing on the same capacity is why the free plan has per-model limits.

### What the free plan requires and covers

Before anyone approves a budget, you can build and test an integration, because the free plan needs only an account, no payment card, and covers real calls with your key, not just a console demo.

![Activepieces workflow builder with HTTP request step selected and its settings panel open showing method, URL, headers, and…](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/9e36e973-de4a-435f-8912-12e666216b2d/self-host-mistral-ai-enterprise-deployment-guide-3f7fe28d.webp)

Read the limits for the model you pick before you size a workload, because a prototype that works at ten requests can fail at a hundred. They differ by model, and Groq lists them on your console's limits page and in its docs.

When you outgrow the free limits, you have to upgrade the account, and that decision belongs to whoever owns the billing, not to the developer who happened to create the key.

### Where to see your key's name and status

When a key has leaked or outlived its purpose, the API Keys page is where you delete it, and it lists every key under the name you gave it.

That makes the name your audit trail: if two people can't say who created a key or what it feeds, you can't safely revoke it.

After you paste the key into a tool, the same question applies: whose model decision is it now? Reselling you a model is deciding your AI strategy for you, and [Activepieces](https://www.activepieces.com) doesn't do that.

![Activepieces AI providers configuration showing active keys for Anthropic, Google Gemini, and OpenAI with their project…](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/46fcc27d-7a84-4c9b-9dbb-14d05347d0c1/what-is-ripple-65b-preview-open-coding-model-gui-beb612c7.webp)

It runs on the Groq key you created yourself, at the per-token rates in your console, so model spend lands on your Groq bill and not ours.

On the Plus plan at $20 a month, with your own AI keys, every AI step costs 1 credit, and you can reach it from Claude, ChatGPT, Cursor or any MCP client.

Activepieces works with any major model or your own provider key, so the model is your choice. Teams at companies like MoneyGram and Moneypenny use it.

## Groq models, endpoints and per-token pricing

When a bill jumps, whoever gets the call will want two facts before anything else: a [Groq](https://groq.com/blog/12-hours-later-groq-is-running-llama-3-instruct-8-70b-by-meta-ai-on-its-lpu-inference-enginge) key reaches one OpenAI-compatible API, and Groq bills the models behind it per million tokens, with output costing roughly twice input.

### Endpoints behind the key

Everything starts from the base URL, `https://api.groq.com/openai/v1`. Because it follows the OpenAI request format, an existing OpenAI client usually needs only the base URL and the key swapped, and the code around it stays as it is.

![A client program box connected by an arrow to a server box, with a small request card travelling along the arrow and a long…](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/02b8a0ab-84a6-49e3-8621-ad4685777fb8/groq-api-key-how-to-create-one-in-groqcloud-2026-a9201c7c.webp)

You'll use two calls first: `/chat/completions` for generation and `/models` for listing what your key can see. The list call is a cheap way to confirm a key works before it goes into an automation, and the same key authorises both.

### Groq GPT OSS model pricing and context compared

For its two GPT OSS models, [Groq's models page](https://console.groq.com/docs/models) gives confirmed list prices per million tokens: **gpt-oss-20b costs $0.17 input and $0.36 output**, and gpt-oss-120b costs $0.33 input and $0.71 output. Read the output price first, because that's where long answers get expensive.

I haven't confirmed context windows, free-tier access or a source date for `llama-3.3-70b-versatile` or `llama-3.1-8b-instant`, so they're not listed above. Read those from the same models page before you commit either one to a workflow. Don't infer them from the GPT OSS prices.

If a workflow writes long replies from short prompts, it costs more than its prompt size suggests, because according to Groq, both models charge about twice as much per generated token as per prompt token.

![Input and output token prices for Groq GPT OSS models](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/4bb3502c-1a76-41ee-aa2d-2db4448c5770/groq-api-key-how-to-create-one-in-groqcloud-2026-3fa82559.svg "Source: Groq")

A summariser that reads a lot and writes little is the cheaper pattern.

If you move from the 20B to the 120B model, both prices roughly double. Only a check you can name, which the smaller model's answers fail, justifies that doubling.

"It felt better" isn't a reason to double the spend. Record who approved that choice, because that person owns the bill.

### Groq batch discounts and free credits

Don't budget around a batch rate, volume discount or free-tier credit for these models. I haven't confirmed any, and the figures confirmed here are standard per-token prices only.

Plan against the list prices above, and if Groq's own pricing documentation lists a discount, add it to your estimate only after you've read the terms and the date on that page.

## Understand Groq rate limits by tier

When a Groq call starts returning 429, whoever gets paged needs the per-model daily limit. On the free tier it runs from 1,000 to 14,400 requests a day, which becomes the ceiling on your estimate before price does: **you're throughput-limited before you're budget-limited**.

![A wall counter showing a daily request tally nearly full for a Groq model, beside a server handing a 429 error card back to…](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/2a3b82bd-eb8f-4e16-b9ac-67153cbf7335/groq-api-key-how-to-create-one-in-groqcloud-2026-2e74487b.webp)

### Groq rate limits per model and tier

Fourteen times: that is the headroom the small model has over the large ones.

According to [FreeInference](https://freeinference.dev/providers/groq/), **Llama 3.1 8B allows 14,400 requests per day**, so it suits high-volume, low-stakes work such as classification. Whisper v3 allows 2,000 requests per day, which caps a transcription job at 2,000 files before the next reset.

Llama 3.3 70B, gpt-oss-120b and Qwen3.8 27B each allow 1,000 requests per day, so an automation that calls one of them every minute will run dry in under seventeen hours.

On paid tiers the ceilings are higher. I'm not quoting paid figures here, because the rate-limits page in Groq's documentation and the limits shown in your own console are the authority for your organization.

Read the console before launch and record who owns the upgrade decision.

### Minimal curl request, then the same call in Python

Export the key so it never appears in a command history or a file:

```bash
export GROQ_API_KEY="your-key-here"
```

Send a POST to the OpenAI-compatible `/chat/completions` URL:

```bash
curl https://api.groq.com/openai/v1/chat/completions \
 -H "Authorization: Bearer $GROQ_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"model":"llama-3.1-8b-instant","messages":[{"role":"user","content":"Say hello."}]}'
```

![Groq free-tier daily request limits by model](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/67a396bf-a2fb-4caf-804e-ab7e98a32be3/groq-api-key-how-to-create-one-in-groqcloud-2026-2869ed8e.svg "Source: FreeInference")

Back comes a JSON object, and the reply text sits inside its `choices` array.

For Python, install the package:

```bash
pip install groq
```

Then run the call. The client reads `GROQ_API_KEY` from the environment:

```python
from groq import Groq

client = Groq()
response = client.chat.completions.create(
 model="llama-3.1-8b-instant",
 messages=[{"role": "user", "content": "Say hello."}],
)
```

Read the answer from `response.choices[0].message.content`:

```python
print(response.choices[0].message.content)
```

If that prints a greeting, the key, the network path and the model name are all correct.

## Fix Groq API errors by status code

Before anyone reads the error body, the status code already names an owner.

Statuses 401 and 403 belong to whoever manages keys, 404 and 413 to whoever wrote the request, and 429 and 5xx to whoever runs the retry logic, which is usually the person paged when the job fails at 2am.

The table below sets the six side by side, so you can tell from the status code alone which of those people should open the ticket.

| Status | Likely cause | How to confirm | Fix |
|---|---|---|---|
| 401 | Key missing, mistyped, revoked or deleted | Call the API with the same key from a terminal; check the key still appears in the console | Issue a new key, update the secret store, redeploy |
| 403 | Key is valid but the request is not permitted for it or its organization | Compare the failing call with one that works; read the error message body | Use a permitted model or endpoint, or ask the organization owner to change access |
| 404 | Wrong model name, wrong endpoint path, or a retired model | Check the model string against the current models list and the changelog | Correct the name or path; migrate off retired models |
| 413 | Request body or prompt too large | Shrink the input and retry; if it passes, size was the cause | Trim, chunk or summarize the input |
| 429 | Request or token limit reached | Read `retry-after` and the `x-ratelimit-*` headers on the response | Wait as instructed, then retry with backoff; reduce concurrency |
| 5xx | Fault on Groq's side or temporary overload | Check Groq's status page; see whether the error clears on retry | Retry with backoff; fail over or queue if it persists |

Read the table by the confirm column first: the quickest checks are the ones that need no code change, such as replaying the call from a terminal.

### 401 and 403: key and permission problems

When you get a 401, Groq didn't accept the key itself. Check for a stray space or newline in the environment variable, a key copied from a different project, or one someone deleted.

![Provider management interface showing configured AI API keys for multiple platforms including Gemini, Anthropic, and OpenAI…](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/9fb86151-ae23-433b-bbb7-81aa887ac0a8/github-models-alternatives-4-options-compared-20-f64cc2a5.webp)

With a 403, Groq recognized the key but refused the action. Retrying fixes neither, so make your code stop and alert rather than loop. Assign a named owner for the key, because a revoked key with no owner stays broken.

### 429: reading the rate-limit headers and backing off

Of all these errors, only the 429 tells you how to recover. Read `retry-after` first and wait at least that long.

The `x-ratelimit-*` headers show which limit you hit, requests or tokens, and how much remains, which decides whether you slow the call rate or shrink the prompts.

Add jitter to your backoff so parallel workers don't all retry in the same instant, and cap the number of attempts so a stuck job fails visibly instead of silently.

### 404 and 413: model name and request size

When a call that worked last month returns 404 in production, Groq has usually deprecated a model. Read Groq's changelog on a schedule, and keep model names in configuration rather than scattered through code, so a rename is one edit.

A 413 means the payload is too big: split documents, trim history, and measure input before sending.

For 5xx errors, treat them as transient, retry with the same backoff, and escalate only when they persist.

## Keep Groq API keys outside code and rotated

Before a Groq key is safe, someone specific has to own it, it has to live outside the source tree, and the person paged at 2am has to know which copy to revoke.

A 5xx retry loop can be tuned later; a key pasted into a repository is an incident the moment it is pushed.

### Store Groq API keys in environment variables

Load the key at runtime from an environment variable on a developer machine, or from a secrets manager in production. The key is then absent from the source tree, from the build output and from anything a colleague clones.

A `.env` file is acceptable locally only if it's listed in `.gitignore` before the first commit, because adding it afterwards leaves earlier commits untouched.

Where a browser is involved, the rule has no exceptions. A key shipped in JavaScript, a mobile bundle or a front-end build variable can be read by anyone who opens the developer tools.

Call Groq from a server you control, and let the browser call that server. Your server is then the place where you can add authentication and per-user limits.

In practice, the rule looks like this:

- Read the key from an environment variable or a secrets manager, never from a string in the code.
- Create one key per app and per environment, so production, staging and a contractor's test setup each have their own.
- Keep the key out of browser code, client bundles and public repositories.
- After a leak, delete the key and create a new one.
- Turn on secret scanning for your repositories.

If staging leaks, you revoke staging and production keeps serving. That is what the one-key-per-environment rule buys you, and the rest depends on it.

If every service shares one key, revoking it takes everything down together, and nobody can tell from the 429 headers which service was burning the quota.

**Name an owner for each key** in whatever record your team keeps, along with where it's stored. Rotate on a schedule your team sets, and also whenever someone with access leaves. A rotation you've rehearsed is a deploy; one you've never tried is an outage.

### What to do the hour a key leaks

**Treat any exposed key as compromised, whether or not you see misuse.** Delete it in the Groq console, then create a new one.

> A rotation you've rehearsed is a deploy; one you've never tried is an outage.

Editing the code to remove the string doesn't help, since the old key stays valid and remains in the history of every clone.

Work in this order:

1. Delete the exposed key in the console so it stops working.
2. Create a replacement and store it in the secrets manager under the same name the app already reads.
3. Redeploy the affected app and confirm it authenticates; a 401 afterwards means a service is still holding the old value.
4. Check the console's usage for calls you don't recognise, and note what you find in the incident record.
5. Find how it escaped, whether a commit, a log line or a shared screenshot, and close that path.

Enable secret scanning on your repositories so the next leak is flagged at push time rather than found by a stranger. Scanning catches the mistake, but the deletion in step one is what ends the exposure.

## Use a Groq key in Activepieces without code

Once the exposed key is deleted and a fresh one issued, paste the new key once as the Groq integration's connection in Activepieces. That way no flow step, script or chat message ever holds it.

![Creating a project variable](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/0070bd2b-a8f0-401a-a7a8-18a2da6f6633/self-host-mistral-ai-enterprise-deployment-guide-4dc19d0b.webp)

It comes down to ownership. When a flow fails at 2am on a Tuesday, someone gets paged, and their first question is which credential the flow was using and who can replace it.

A connection gives that question one answer: a named entry that steps select from a list, rather than a string copied into a dozen places.

### Add the connection and run one action

Create the key in the Groq console first, under a name that says what it's for, such as the flow or team that will use it. Then:

1. Create a new flow, or open an existing one, and add a step. Search for Groq and choose the Groq integration.
2. Pick the action. Choose from the list the integration shows in your editor, and use only what appears there. Don't rely on a name remembered from another tutorial, because the integration's action list is the authority.
3. In the connection field, choose to create a new connection, give it a name that identifies the owner and purpose, and paste the key into the key field. This is the only time you handle it.
4. Fill in the action's required inputs, then use the test step button. A successful response confirms the key works and the model you chose is available to your account.
5. Publish the flow once the test returns what you expect.

If the test fails, read the error before changing anything. An authentication failure means the pasted key is wrong or was deleted. A rate-limit failure means the key is fine and you've hit its limits, so slow the flow down rather than regenerating the key.

Before the flow runs unattended, confirm these:

- The old exposed key is deleted in the Groq console, not just replaced.
- The new key exists only in the Activepieces connection and your secrets store, and appears in no flow field, document or message.
- The connection's name says who owns it and what it serves, so the person paged at 2am can find it.
- The test step passed against the action you actually published.
- Someone besides the author knows where to rotate the key and which flows will break when they do.
- The flow's behaviour on a rate-limit error is decided, whether that's retry, wait or alert, rather than left to default.

## Related reading

- [Groq Free Tier: Daily Request Limits (2026 Guide)](https://www.activepieces.com/blog/groq-free-tier-daily-request-limits-2026-guide)
- [Groq API Pricing 2026: Per-Token Cost Compared](https://www.activepieces.com/blog/groq-api-pricing-2026-per-token-cost-compared)

## References

- [FreeInference](https://freeinference.dev/providers/groq/)
- [Groq](https://groq.com/blog/thank-you-1m-developers-building-with-groqcloud)
- [Groq](https://console.groq.com/docs/models)
