Skip to main content
Groq is a company that offers fast AI inference, powered by LPU™ AI inference technology which delivers fast, affordable, and energy efficient AI. This will help you getting started with ChatGroq chat models. For detailed documentation of all ChatGroq features and configurations head to 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

In order to use the Groq API you’ll need an API key. You can sign up for a Groq account and create an API key here. 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

Json invocation


API reference

For detailed documentation of all ChatGroq features and configurations head to the API reference.
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.