Read this before you paste a live API key
- Your request, key included, is relayed through api-tester.com's server. Browsers block a web page from reading another origin's response unless that origin opts in, and Groq's API does not opt in for arbitrary sites. A browser-based tester therefore has to hand the request to a server and return the result. Ours is that server, so your key passes through our infrastructure on the way to Groq.
- Keys are not logged or stored by us. The credential signs the outbound request and is then gone; your request history stays in your own browser's local storage and is never uploaded. That is a commitment rather than something you can verify from outside, and you are entitled to treat it accordingly.
- Use a key you created for testing, not the one your production service runs on. Create a second key in the Groq console for experiments like this one and delete it when you are finished.
- If you are unsure about a key, rotate it. Deleting a key and creating a replacement takes a minute. Any key you have pasted into a third-party tool and feel uneasy about should simply be replaced.
If none of this sits right for a particular credential, build the request here with the key field empty, press Copy as cURL, and add the key on your own machine. You get the exact request and the secret never leaves your laptop.
How to test a Groq API key
1. Create a key
Keys are created in the Groq console. As with most providers, the full key is displayed only once.
2. Use the models endpoint as your probe
The request pre-filled above is a GET to
https://api.groq.com/openai/v1/models. It needs a valid key, generates nothing, and returns
the identifiers you will need for a chat request.
3. Send the key as a bearer token
The Auth tab is already set to Bearer token; paste the key into the field. It is sent
as Authorization: Bearer <key>. The bearer token
guide covers the header and its common mistakes.
4. Send, then read the headers as well as the body
A 200 with a JSON object whose data field is an array of models means the key
works. On this API the response headers are as informative as the body, for the reason given in the
rate-limit section below.
The base path: /openai/v1, not /v1
Groq's API is OpenAI-compatible, and it says so in the URL. Every endpoint lives under
https://api.groq.com/openai/v1. The habit of typing /v1/chat/completions
after the host name, learned on other providers, produces a
404 here.
https://api.groq.com/openai/v1/models ← correct https://api.groq.com/openai/v1/chat/completions ← correct https://api.groq.com/v1/chat/completions ← 404
The same applies when you point an OpenAI SDK at Groq: the base URL is
https://api.groq.com/openai/v1, with nothing after it. Client libraries append
/chat/completions themselves, so a base URL that already ends in it produces a doubled
path and, again, a 404. If your code fails and the request works in this console, compare the full URL
your client is building against the one above.
Valid key vs invalid key: what you'll see
GET https://api.groq.com/openai/v1/models
Authorization: Bearer <your key>
200 OK → { "object": "list", "data": [ { "id": "…", "object": "model", … }, … ] }
401 → { "error": { "message": "Invalid API Key",
"type": "invalid_request_error",
"code": "invalid_api_key" } }
Groq returns the same 401 body whether the
Authorization header is absent or carries a key it does not know, so the response alone
will not tell you which. If you are sure the key is right, check that the header reached the server at
all: a proxy that strips Authorization, or an HTTP client that drops it when following a
redirect, looks identical to a bad key from this end.
Reading Groq's rate-limit headers
Groq limits usage along more than one dimension at once — requests and tokens, per minute and per day — and the limits differ by model and by account tier. It does not make you guess where you stand: responses carry headers that state the limit, what remains, and when it resets.
| Header | Meaning |
|---|---|
x-ratelimit-limit-requests | Requests allowed per day |
x-ratelimit-remaining-requests | Requests left today |
x-ratelimit-reset-requests | Time until the daily request allowance is restored |
x-ratelimit-limit-tokens | Tokens allowed per minute |
x-ratelimit-remaining-tokens | Tokens left in the current minute |
x-ratelimit-reset-tokens | Time until the per-minute token allowance is restored |
retry-after | Sent with a 429 only: seconds to wait before trying again |
After a chat request in the console above, open the response headers and look for these. They are the current truth for your account, which is why this page quotes no numbers of its own. Note the mismatch in windows: Groq's documentation says the request headers always refer to the daily allowance and the token headers to the per-minute one, so a comfortable request count says nothing about the next minute.
A 429 means one of those dimensions ran out. Hitting the token
limit while well inside the request limit is normal on a fast API, because a few large prompts spend
the token allowance quickly. Honour retry-after, and if it happens routinely, slow the
client down using the remaining headers before the limit is reached. The
rate limiting guide covers both approaches.
Sending a chat request
POST https://api.groq.com/openai/v1/chat/completions
Authorization: Bearer <your key>
Content-Type: application/json
{
"model": "<MODEL-ID-FROM-YOUR-LIST>",
"messages": [
{ "role": "user", "content": "Say hello." }
]
}
Take the model identifier from your own /openai/v1/models response. Groq hosts models from
several publishers and retires them on a schedule, so a name copied from an old tutorial is a common
cause of a 404 with the code model_not_found. To run the call, pick the chat
endpoint from the list beside the console, add Content-Type: application/json in the
Headers tab and paste the body into the Body tab. Leave streaming off: this console shows one completed
response.
Groq is not Grok
Groq, with a q, is an inference company that runs open-weight models on its own hardware. Grok, with a k, is the model family made by xAI and served from a different API entirely. The keys are not interchangeable, and a Groq key sent to xAI is simply an unknown key. If yours came from the xAI console, use the Grok API tester.
Provider APIs change — check the official docs
api-tester.com is an independent tool with no affiliation to, partnership with or endorsement from Groq. Nothing here is official documentation. Endpoints, model names, error wording and limits are the provider's to change, and this page can fall behind. For current and authoritative detail, consult the official Groq API documentation.
We have deliberately not quoted prices, rate-limit numbers or model identifiers. Those change fastest, and a stale figure stated confidently is worse than none. What this page describes is the durable shape of the API: its base path, how it authenticates, and how it reports errors and limits.
Test other providers and related tools
Grok API Tester
Test an xAI key and read the permissions attached to it.
OpenAI API Tester
Bearer authentication, the models endpoint, and why 429 covers two different problems.
OpenRouter API Tester
Inspect a key's credit limit and usage before sending a prompt.
DeepSeek API Tester
Check a key and its balance, and tell a 402 from a 429.
API Key Tester
A generic checker for any API key, whatever the authentication scheme.
API Rate Limiting
How limits are counted, and how to back off and retry.
Frequently asked questions
How do I test whether my Groq API key is valid?
Send a GET request to https://api.groq.com/openai/v1/models with the key in an Authorization header using the Bearer scheme. A valid key returns 200 and a list of models. An invalid or missing key returns 401 with the code invalid_api_key.
What is the base URL for the Groq API?
https://api.groq.com/openai/v1. The /openai segment is part of the path, and leaving it out returns 404. Use the same value as the base URL when configuring an OpenAI client library to talk to Groq.
Why am I getting a 429 from Groq?
You have used up a request or token allowance for the current window. The retry-after header on the response says how many seconds to wait, and the x-ratelimit-remaining-* headers on earlier responses show which allowance was running low.
Is Groq the same as Grok?
No. Groq is a company that hosts open-weight models on its own inference hardware, at api.groq.com. Grok is the family of models made by xAI, at api.x.ai. The APIs and keys are unrelated.
Does my API key pass through your server?
Yes. Browsers block cross-origin reads, so the request is forwarded through api-tester.com's server, which means your key transits our infrastructure on the way to Groq. We do not log or store keys, but you should use a key created for testing and delete it afterwards. To keep the secret local, build the request here without a key, copy it as cURL and add the key on your own machine.
Is this tool affiliated with Groq?
No. api-tester.com is an independent HTTP request console with no affiliation to, partnership with or endorsement from Groq. Check the official Groq documentation for current endpoints and behaviour.