Groq

groq

YAML config

providers:
  - id: groq:llama-3.1-70b-versatile
    config:
      apiKey: ${GROQ_API_KEY}

TypeScript usage

import { createProvider } from "@evalguard/core";

const provider = createProvider("groq", process.env.GROQ_API_KEY);
const response = await provider.complete({
  model: "llama-3.1-70b-versatile",
  messages: [{ role: "user", content: "Hello" }],
});

Authentication

Set GROQ_API_KEY in your environment. EvalGuard validates the key on first call and surfaces typed errors for 401 / 403 / rate-limit responses (with Retry-After parsing).

Setup walkthrough

  1. 1. Sign up for a Groq account on their official website.
  2. 2. Obtain your API key from the Groq dashboard after logging in.
  3. 3. Review the API documentation to understand the endpoints and request formats.
  4. 4. Set up your development environment with the necessary libraries for making HTTP requests.
  5. 5. Test your API key with a simple request to ensure connectivity.

Gotchas

  • API key may take a few minutes to activate after account creation.
  • Rate limits are enforced per minute, so batch requests accordingly.
  • Some models may not be available in all regions, check the availability list.

Cost note

Pricing is $0.01 per 1,000 tokens for the cheapest model and $0.03 per 1,000 tokens for flagship models.

Recommended models

Eval / judge
groq-llm-eval-v1
Agent / tool-use
groq-llm-agent-v1
Code
groq-llm-code-v1
Vision
groq-llm-vision-v1

LLM-generated (llm-gpt-4o) · 2026-05-23