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

Vision

Groq supports vision capabilities with select models, allowing you to send images along with text prompts.
Vision-capable models
  • meta-llama/llama-4-scout-17b-16e-instruct
  • meta-llama/llama-4-maverick-17b-128e-instruct
For the latest list of vision-capable models, check the Groq documentation.
Image URL requirementsGroq fetches images from URLs directly. Ensure your image URLs:
  • Are publicly accessible (no authentication required)
  • Return the image directly (no redirects)
  • Maximum image size: 20MB per request

API reference

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