{
 "kind": "api",
 "slug": "groq",
 "path": "apis/groq/",
 "name": "Groq (LLM inference)",
 "logo": "https://agentgid.com/media/avatars/groq.png",
 "maker": "Groq",
 "density": "full",
 "crumbs": [
  [
   "APIs",
   "apis/"
  ],
  [
   "Model hosting and inference",
   "apis/inference/"
  ]
 ],
 "lead": "Fast answers from open AI models.",
 "chips": [
  {
   "label": "Model hosting and inference",
   "path": "apis/inference/"
  }
 ],
 "primary": {
  "label": "Copy prompt for your agent",
  "copy": "Add Groq to my app on the server: use the groq package (or the OpenAI client with base_url https://api.groq.com/openai/v1) with GROQ_API_KEY from .env, model openai/gpt-oss-20b, retry 429 and 5xx with backoff, and never put the key in browser code."
 },
 "links": [
  {
   "label": "Website",
   "href": "https://groq.com"
  },
  {
   "label": "Pricing",
   "href": "https://console.groq.com/docs/models"
  },
  {
   "label": "GitHub",
   "href": "https://github.com/groq/groq-typescript"
  }
 ],
 "track": "Outages, price changes and new versions on your dashboard",
 "verdicts": [
  {
   "key": "price",
   "label": "Price",
   "value": "Paid",
   "status": "info",
   "sub": "from $0.075",
   "quote": null,
   "note": "No free tier on the pricing page. As reported on the official pricing page, checked Oct 22, 2026.",
   "src": "https://console.groq.com/docs/models"
  },
  {
   "key": "commercial",
   "label": "Commercial use",
   "value": "With conditions",
   "status": "cond",
   "sub": null,
   "quote": "Customer and its Authorized Users will comply with the applicable AI Model Terms for each AI Model Service that is used under this Agreement.",
   "note": "Allowed; follow Groq's acceptable use policy and the terms of each model's maker. Data: No",
   "src": "https://console.groq.com/docs/legal/services-agreement.md"
  },
  {
   "key": "key",
   "label": "Key & sign-up",
   "value": "API key, server only",
   "status": "info",
   "sub": "Env var GROQ_API_KEY",
   "quote": "Configure your API key as an environment variable.",
   "note": "API key in the header Authorization: Bearer <key>",
   "src": "https://console.groq.com/docs/quickstart.md"
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Docs for agents",
   "status": "info",
   "sub": "SDK",
   "quote": null,
   "note": " Our agent check: 2 of 6 (Nov 13, 2026).",
   "src": "https://groq.com"
  }
 ],
 "vfoot": "Checked against the maker's official pages, pricing on Oct 22, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Groq (LLM inference) does",
   "parts": [
    {
     "t": "prose",
     "text": "Groq is an online service that runs open AI language models, such as OpenAI's GPT-OSS, and returns their answers very quickly. Your app sends a question or a task and gets the text back, paying per amount of text. It works with the same code as the OpenAI service once you change the address and the key."
    },
    {
     "t": "list",
     "items": [
      "Groq (LLM inference) is one of 41 APIs in the Model hosting and inference category on AgentGid.",
      "It is not among the 13 that can be started for free.",
      "6 of them ship an official MCP server; Groq (LLM inference) does not.",
      "Its official SDK is the 4th most downloaded in the category (4.9M a week)."
     ],
     "muted": true
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "A chat assistant in your app",
       "text": "Answer your users' questions inside your app or site, with replies that show up word by word while they are written.",
       "idea": false
      },
      {
       "title": "Text features in a Next.js app",
       "text": "Write product descriptions, summaries or recipes from a short prompt inside a JavaScript web app built with the Vercel AI toolkit.",
       "idea": false
      },
      {
       "title": "Sort and tag incoming emails",
       "text": "Turn free text, like support emails or form answers, into fixed fields your app can store, such as category and urgency.",
       "idea": false
      },
      {
       "title": "Answers with today's news",
       "text": "Let the model look things up on the web before it answers, for questions about recent events.",
       "idea": false
      },
      {
       "title": "Voice notes into text",
       "text": "Turn recorded voice messages or calls into text with OpenAI's Whisper model, hosted by Groq and billed per hour of audio.",
       "idea": false
      },
      {
       "title": "Big jobs overnight at half price",
       "text": "Send thousands of requests at once, such as tagging a whole product catalog, and collect the results within a day or a week.",
       "idea": false
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Groq (LLM inference) popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "5M",
       "l": "SDK downloads a week",
       "d": "+0.3% on the 4-week average",
       "up": true
      },
      {
       "n": "269",
       "l": "GitHub stars, groq/groq-typescript"
      }
     ]
    },
    {
     "t": "small",
     "text": "SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026."
    }
   ]
  },
  {
   "id": "pricing",
   "nav": "Pricing and limits",
   "h2": "Pricing",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Free tier",
       "v": "None"
      },
      {
       "l": "Cheapest plan",
       "v": "No monthly plan"
      },
      {
       "l": "Usage price",
       "v": "gpt-oss-120b $0.15 in / $0.60 out per 1M tokens; gpt-oss-20b $0.075 / $0.30"
      }
     ]
    },
    {
     "t": "h3",
     "text": "What one action costs"
    },
    {
     "t": "table",
     "head": [
      "Action",
      "Price"
     ],
     "num": true,
     "rows": [
      [
       "1M input tokens, openai/gpt-oss-120b",
       "$0.15"
      ],
      [
       "1M output tokens, openai/gpt-oss-120b",
       "$0.60"
      ],
      [
       "1M input tokens, openai/gpt-oss-20b",
       "$0.075"
      ],
      [
       "1 hour of audio transcribed, whisper-large-v3-turbo",
       "$0.04"
      ],
      [
       "1 hour of audio transcribed, whisper-large-v3",
       "$0.111"
      ]
     ]
    },
    {
     "t": "small",
     "text": "As reported on the official pricing page, checked Oct 22, 2026. Prices change: confirm before you buy.",
     "link": "console.groq.com/docs/models",
     "href": "https://console.groq.com/docs/models"
    }
   ]
  },
  {
   "id": "limits",
   "nav": null,
   "spy_as": "pricing",
   "h2": "Limits",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Base limits (table on the rate limits page)",
       "v": "openai/gpt-oss-120b: 30 requests a minute, 1,000 a day, 8,000 tokens a minute, 200,000 tokens a day",
       "src": "https://console.groq.com/docs/rate-limits.md"
      },
      {
       "l": "Developer",
       "v": "openai/gpt-oss-120b: 1,000 requests and 250,000 tokens a minute",
       "src": "https://console.groq.com/docs/models.md"
      },
      {
       "l": "All plans",
       "v": "Limits apply to the whole organization, not to each key or person; cached tokens do not count.",
       "src": "https://console.groq.com/docs/rate-limits.md"
      },
      {
       "l": "Free / Developer",
       "v": "Audio files up to 25 MB on the free tier and 100 MB on the dev tier",
       "src": "https://console.groq.com/docs/speech-to-text.md"
      }
     ]
    },
    {
     "t": "small",
     "text": "From the official docs.",
     "link": "console.groq.com/docs/rate-limits.md",
     "href": "https://console.groq.com/docs/rate-limits.md"
    }
   ]
  },
  {
   "id": "access",
   "nav": "Access and terms",
   "h2": "Key and access",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "How it signs in",
       "v": "API key in the header Authorization: Bearer <key>"
      },
      {
       "l": "Environment variable",
       "v": "GROQ_API_KEY",
       "code": true
      },
      {
       "l": "Safe in browser code",
       "v": "No, keep it on your server",
       "status": "no"
      },
      {
       "l": "Card at sign-up",
       "v": "No"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Steps only a person can do"
    },
    {
     "t": "list",
     "items": [
      "Create a Groq account and an API key. Put it in .env as GROQ_API_KEY (kept out of git) and read it on the server.",
      "For higher limits, batch jobs and spend limits, upgrade to the Developer tier with a payment method. No code change; the same key gets the higher limits.",
      "Optionally turn on Zero Data Retention for the organization. Do not use the batch endpoints, which are switched off under ZDR."
     ]
    }
   ]
  },
  {
   "id": "terms",
   "nav": null,
   "spy_as": "access",
   "h2": "Commercial use and your data",
   "parts": [
    {
     "t": "prose",
     "text": "Groq is a paid online service with a free tier, and you can use it in a commercial product. You own your inputs and outputs; each model also has its own maker's terms you must follow."
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In a paid app",
       "v": "With conditions",
       "status": "cond",
       "sub": "Allowed; follow Groq's acceptable use policy and the terms of each model's maker.",
       "quote": "Customer and its Authorized Users will comply with the applicable AI Model Terms for each AI Model Service that is used under this Agreement.",
       "src": "https://console.groq.com/docs/legal/services-agreement.md"
      },
      {
       "l": "inside-app-bundle",
       "v": "Yes",
       "status": "yes",
       "sub": "The official groq and groq-sdk packages are Apache-2.0; the key itself must stay on your server.",
       "quote": "\"license\":\"Apache-2.0\"",
       "src": "https://registry.npmjs.org/groq-sdk/1.6.0"
      },
      {
       "l": "client-work",
       "v": "Yes",
       "status": "yes",
       "sub": "The customer keeps the rights in inputs and outputs; use a key in the client's own Groq organization.",
       "quote": "As between the parties, Customer retains all Intellectual Property Rights in Customer Data (including in Inputs and Outputs), any Customer Application, Customer Training Data, and Customer supplied AI Model Service.",
       "src": "https://console.groq.com/docs/legal/services-agreement.md"
      },
      {
       "l": "To train your own AI",
       "v": "With conditions",
       "status": "cond",
       "sub": "Groq does not train on your data; whether you may train on outputs depends on each model's own terms.",
       "quote": "Customer and its Authorized Users will comply with the applicable AI Model Terms for each AI Model Service that is used under this Agreement.",
       "src": "https://console.groq.com/docs/legal/services-agreement.md"
      },
      {
       "l": "Trains on what you send",
       "v": "No",
       "quote": "For clarity, Groq is not permitted to use Inputs or Outputs for training or fine-tuning any AI Model Services or other models, unless explicitly granted permission or instructed by Customer.",
       "src": "https://console.groq.com/docs/legal/services-agreement.md"
      },
      {
       "l": "Keeps your data",
       "v": "Inputs and outputs are not kept by default; they may be logged for up to 30 days to fix failures or check abuse, and batch files are kept up to 30 days.",
       "quote": "By default, Groq does not retain customer data for inference requests.",
       "src": "https://console.groq.com/docs/your-data.md"
      },
      {
       "l": "Where data is stored",
       "v": "Stored customer data is kept in Google Cloud buckets in the United States.",
       "quote": "All customer data is retained in Google Cloud Platform (GCP) buckets located in the United States.",
       "src": "https://console.groq.com/docs/your-data.md"
      }
     ]
    }
   ]
  },
  {
   "id": "errors",
   "nav": null,
   "spy_as": "access",
   "h2": "Errors to handle",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "401 Unauthorized",
       "v": "The key is missing or not valid.",
       "sub": "Check that GROQ_API_KEY is set on the server and that the key was not deleted in the console."
      },
      {
       "l": "400 Bad Request (also blocked_api_access when a spend limit is reached)",
       "v": "The request has a wrong field, an OpenAI option Groq does not support, or the organization hit its spend limit.",
       "sub": "Remove unsupported fields such as logprobs or logit_bias; for blocked_api_access raise or remove the spend limit."
      },
      {
       "l": "429 Too Many Requests",
       "v": "A rate limit for requests or tokens was reached.",
       "sub": "Wait for the seconds in the retry-after header, then retry with backoff; upgrade for higher limits."
      },
      {
       "l": "498 Flex Tier Capacity Exceeded",
       "v": "The cheaper flex tier is full at the moment.",
       "sub": "Retry later or send the request on the standard tier."
      },
      {
       "l": "500 / 502 / 503",
       "v": "A problem on Groq's side; these requests are not charged.",
       "sub": "Retry later with backoff."
      }
     ]
    }
   ]
  },
  {
   "id": "agent",
   "nav": "For agents",
   "h2": "Use it from an agent",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Our agent check",
       "v": "2 of 6: llms.txt no, OpenAPI no, SDK yes, MCP no, status page no, AI assistants allowed yes",
       "sub": "Checked Nov 13, 2026."
      },
      {
       "l": "MCP server",
       "v": "None found",
       "sub": null
      },
      {
       "l": "npm",
       "v": "npm install groq-sdk",
       "code": true
      },
      {
       "l": "PyPI",
       "v": "pip install groq",
       "code": true
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Groq (LLM inference)",
       "me": true,
       "facts": [
        "from $0.075",
        "No free tier"
       ]
      },
      {
       "name": "OpenAI API",
       "why": "Pick the OpenAI API when you want OpenAI's own GPT models with vision, tool calling and agents, billed per 1M tokens.",
       "path": "apis/openai-api/",
       "facts": [
        "from $0.1",
        "No free tier"
       ]
      },
      {
       "name": "Gemini API",
       "why": "Pick the Gemini API when you need image, audio or video input as well as text, with a free tier.",
       "path": "apis/google-gemini-api/",
       "facts": [
        "Free plan",
        "Free tier"
       ]
      }
     ],
     "more": "All model hosting and inference APIs",
     "more_path": "apis/inference/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Add Groq to my app on the server: use the groq package (or the OpenAI client with base_url https://api.groq.com/openai/v1) with GROQ_API_KEY from .env, model openai/gpt-oss-20b, retry 429 and 5xx with backoff, and never put the key in browser code."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Create an API key in the Groq console and keep it in your environment as GROQ_API_KEY.",
       "code": "export GROQ_API_KEY=<your-api-key-here>",
       "src": "https://console.groq.com/docs/quickstart.md"
      },
      {
       "text": "Install the official Python package (or keep using the OpenAI package with Groq's address).",
       "code": "pip install groq",
       "src": "https://console.groq.com/docs/quickstart.md"
      },
      {
       "text": "To reuse OpenAI code, change only the base address and the key.",
       "code": "client = openai.OpenAI(\n    base_url=\"https://api.groq.com/openai/v1\",\n    api_key=os.environ.get(\"GROQ_API_KEY\")\n)",
       "src": "https://console.groq.com/docs/openai.md"
      }
     ]
    },
    {
     "t": "h3",
     "text": "First request"
    },
    {
     "t": "tabs",
     "label": "First request",
     "items": [
      {
       "tab": "Request",
       "code": "curl https://api.groq.com/openai/v1/responses -s \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $GROQ_API_KEY\" \\\n-d '{\n  \"model\": \"openai/gpt-oss-120b\",\n  \"input\": \"Tell me a three sentence bedtime story about a unicorn.\"\n}'",
       "intro": "Trimmed; the full example reply in the docs also lists the settings used. The docs' example reply names llama-3.3-70b-versatile as the model although the request asks for openai/gpt-oss-120b."
      },
      {
       "tab": "Response",
       "code": "{\n  \"id\": \"resp_01k1x6w9ane6d8rfxm05cb45yk\",\n  \"object\": \"response\",\n  \"status\": \"completed\",\n  \"output\": [\n    {\n      \"type\": \"message\",\n      \"role\": \"assistant\",\n      \"content\": [\n        {\n          \"type\": \"output_text\",\n          \"text\": \"When the stars blinked awake, Luna the unicorn curled her mane and whispered wishes to the sleeping pine trees. ...\"\n        }\n      ]\n    }\n  ],\n  \"usage\": { \"input_tokens\": 82, \"output_tokens\": 266, \"total_tokens\": 348 }\n}"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "Copying model llama-3.3-70b-versatile from the quickstart into a new app.",
       "fix": "Use a production model listed with a price, such as openai/gpt-oss-20b or openai/gpt-oss-120b.",
       "why": "The models page now lists Llama 3.3 70B as Enterprise with Contact Sales pricing."
      },
      {
       "dont": "Setting dangerouslyAllowBrowser to true and calling Groq from the web page.",
       "fix": "Call Groq from a server route and keep GROQ_API_KEY on the server.",
       "why": "Anyone who opens the page could copy the key and spend your money."
      },
      {
       "dont": "Sending OpenAI options logprobs, logit_bias or n greater than 1.",
       "fix": "Leave them out; Groq answers them with a 400 error.",
       "why": "These OpenAI fields are not supported on Groq."
      },
      {
       "dont": "Asking for strict JSON output and web search in the same request.",
       "fix": "Run browser search first, then a second request with structured outputs on the answer.",
       "why": "Browser search does not work together with structured outputs."
      },
      {
       "dont": "Using whisper-large-v3-turbo to translate audio into English.",
       "fix": "Use whisper-large-v3 for translation; turbo only transcribes.",
       "why": "The speech-to-text table marks translation as not supported for turbo."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Is there a free tier?",
       "a": "Yes. The Free tier needs no payment method; you add one only to move to the pay-as-you-go Developer tier.",
       "evidence": {
        "url": "https://console.groq.com/docs/billing-faqs.md",
        "quote": "To upgrade from the Free tier to the Developer tier, you'll need to provide a valid payment method (credit card, US bank account, or SEPA debit account)."
       }
      },
      {
       "q": "Can I keep my OpenAI code?",
       "a": "Mostly. Point the OpenAI client at https://api.groq.com/openai/v1 with a Groq key; a few options like logprobs are not supported.",
       "evidence": {
        "url": "https://console.groq.com/docs/openai.md",
        "quote": "The following fields are currently not supported and will result in a 400 error (yikes) if they are supplied"
       }
      },
      {
       "q": "Does Groq train on my prompts?",
       "a": "No. Its agreement says inputs and outputs are not used for training unless you allow it.",
       "evidence": {
        "url": "https://console.groq.com/docs/legal/services-agreement.md",
        "quote": "For clarity, Groq is not permitted to use Inputs or Outputs for training or fine-tuning any AI Model Services or other models, unless explicitly granted permission or instructed by Customer."
       }
      },
      {
       "q": "Can I cap my bill?",
       "a": "Yes, on paid plans. A spend limit blocks all keys of the organization when the monthly cap is reached.",
       "evidence": {
        "url": "https://console.groq.com/docs/spend-limits.md",
        "quote": "Spend limits automatically protect your budget by blocking API access when you reach your monthly cap."
       }
      },
      {
       "q": "Am I charged for failed requests?",
       "a": "Not for errors on Groq's side (500, 502, 503).",
       "evidence": {
        "url": "https://console.groq.com/docs/errors.md",
        "quote": "You will not be charged for requests that return server error codes."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Maker",
   "Groq"
  ],
  [
   "Category",
   "Model hosting and inference"
  ],
  [
   "Price",
   "from $0.075"
  ],
  [
   "Official SDK",
   "npm groq-sdk, PyPI groq"
  ],
  [
   "Latest SDK",
   "1.7.0 on npm"
  ],
  [
   "Agent check",
   "2 of 6"
  ],
  [
   "Pricing checked",
   "Oct 22, 2026"
  ]
 ],
 "good": [
  "You need a Groq account and a secret key. The free tier needs no card; paying per use needs a payment method.",
  "Limits count for your whole organization, so all your keys and apps share them.",
  "Some popular models, such as Llama 3.3 70B, are now listed for enterprise customers only, with prices on request."
 ],
 "checked_line": "Read by AgentGid from 29 official pages, card checked Nov 10, 2026; usage numbers update daily."
}