Skip to main content
Groq offers fast AI inference powered by LPU™ AI inference technology. For a list of available models, see the Groq model documentation. This page helps you get started with Groq chat models. For detailed documentation of all ChatGroq features and configurations, see the API reference.

Overview

Integration details

Model features

See the links in the table headers below for guides on how to use specific features.

Setup

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

Credentials

To use the Groq API, create an API key in the Groq console. Then, you can set the API key as an environment variable in your terminal:
If you want to get automated tracing of your model calls you can also set your LangSmith API key by uncommenting below:

Installation

The LangChain ChatGroq integration lives in the @langchain/groq package:

Instantiation

Now we can instantiate our model object and generate chat completions:

Invocation

Invoke with JSON output


API reference

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