--- id: groq version: "1.6.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # groq — The official Python library for the groq API License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install groq uv add groq poetry add groq ## Description # Groq Python API library [![PyPI version](https://img.shields.io/pypi/v/groq.svg?label=pypi%20(stable))](https://pypi.org/project/groq/) 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](https://github.com/encode/httpx). It is generated with [Stainless](https://www.stainless.com/). ## Documentation The REST API documentation can be found on [console.groq.com](https://console.groq.com/docs). The full API of this library can be found in [api.md](https://github.com/groq/groq-python/tree/main/api.md). ## Installation ```sh # install from PyPI pip install groq ``` ## Usage The full API of this library can be found in [api.md](https://github.com/groq/groq-python/tree/main/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",... ## AI interpretation — verify before relying 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. 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. [View on SkillFed](https://skillfed.io/packages/groq) · [View on PyPI](https://pypi.org/project/groq/)