Skip to main content
This page makes reference to Groq, an AI hardware and software company. For information on how to use Grok models (provided by xAI), see the xAI provider page.
API ReferenceFor detailed documentation of all features and configuration options, head to the ChatGroq API reference.
For a list of all Groq models, visit their docs.

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


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.