Groq API keys

25 community-sourced Groq keys, re-checked against the API. Copy a key below, export it as GROQ_API_KEY, and send requests to https://api.groq.com/openai/v1.

Keys

Using your Groq key

Export the key as GROQ_API_KEY, then call the API at https://api.groq.com/openai/v1.

export GROQ_API_KEY="your-key-here"

curl

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

Python (OpenAI SDK)

from openai import OpenAI
import os

client = OpenAI(
    api_key=os.environ["GROQ_API_KEY"],
    base_url="https://api.groq.com/openai/v1",
)

resp = client.chat.completions.create(
    model="llama-4-scout",
    messages=[{"role": "user", "content": "Say hello"}],
)
print(resp.choices[0].message.content)

Node.js

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.GROQ_API_KEY,
  baseURL: "https://api.groq.com/openai/v1",
});

const resp = await client.chat.completions.create({
  model: "llama-4-scout",
  messages: [{ role: "user", content: "Say hello" }],
});
console.log(resp.choices[0].message.content);