Skip to main content
This will help you get started with Groq chat models. For detailed documentation of all ChatGroq features and configurations head to the API reference. For a list of all Groq models, visit this link.

Overview

Integration details

Model features

Setup

To access Groq models you’ll need to create a Groq account, get an API key, and install the langchain-groq integration package.

Credentials

Head to the Groq console to sign up to Groq and generate an API key. Once you’ve done this set the GROQ_API_KEY environment variable:
To enable automated tracing of your model calls, set your LangSmith API key:

Installation

The LangChain Groq integration lives in the langchain-groq package:

Instantiation

Now we can instantiate our model object and generate chat completions.
Reasoning FormatIf you choose to set a reasoning_format, you must ensure that the model you are using supports it. You can find a list of supported models in the Groq documentation.

Invocation

Chaining

We can chain our model with a prompt template like so:

API reference

For detailed documentation of all ChatGroq features and configurations head to the API reference.