skillfed

groq

The official Python library for the groq API

groq Permissive license Apache-2.0 Active 613 v1.6.0 released

Install

groq on PyPI

pip

pip install groq

uv

uv add groq

poetry

poetry add groq

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 6 — anyio, distro, httpx, pydantic, sniffio, typing-extensions
Maintenance actively maintained — 20 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: groq-1.6.0-py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

About groq

from the package's own PyPI description — quoted content, verbatim

Groq Python API library

<!-- prettier-ignore --> PyPI version (image)

The Groq Python library provides convenient access to the Groq REST API from any Python 3.10+ application. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by httpx.

It is generated with Stainless.

Documentation

The REST API documentation can be found on console.groq.com. The full API of this library can be found in api.md.

Installation

# install from PyPI
pip install groq

Usage

The full API of this library can be found in api.md.

```python import os from groq import Groq

client = Groq( api_key=os.environ.get("GROQ_API_KEY"), # This is the default and can be omitted )

chat_completion = client.chat.completions.create( messages=[ { "role": "user",...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

A Python client library for the Groq REST API, providing synchronous and asynchronous access to Groq's language model services with full type hints and automatic request/response validation.

Low friction: pure Python wheel with six common dependencies (anyio, distro, httpx, pydantic, sniffio, typing-extensions). Active maintenance—last commit 2026-08-13, 20 days since latest release, 613 repository stars.

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes, but no copyleft obligation.

Usage

pip install groq

import os
from groq import Groq

client = Groq(api_key=os.environ.get("GROQ_API_KEY"))
chat_completion = client.chat.completions.create(
    messages=[{"role": "user", "content": "Hello"}],
    model="openai/gpt-oss-20b"
)
print(chat_completion.choices[0].message.content)

Requires Python 3.10 or later and a valid GROQ_API_KEY environment variable or explicit api_key parameter.

Verdict: Well-maintained, actively developed official client with low install friction and no known vulnerabilities. Apache-2.0 licensing and broad platform support make it suitable for production use. Requires Python 3.10+ and a Groq API key to function.

Needs verification

  • Whether the async client with aiohttp backend (optional extra) introduces additional dependencies or compatibility constraints.
  • Rate limits and retry behavior specifics beyond the documented 2x default retries.
  • Performance characteristics and latency claims relative to competing LLM client libraries.
groq api client pythonllm api wrapperasync language model clientgroq chat completionstyped rest api clientlow latency llm access

Similar packages