Groq client libraries
Groq provides both a Python and JavaScript/Typescript client librar
Groq Python API Library
The Groq Python library provides convenient access to the Groq REST API from any Python 3.7+ application.The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients.
Installation
Usage
Use the library and your secret key to run:
While you can provide an api_key keyword argument, we recommend using python-dotenv to add GROQ_API_KEY="My API Key"
to your .env file so that your API Key is not stored in source control.
The following response is generated:
Groq Python API Library
The Groq Python library provides convenient access to the Groq REST API from any Python 3.7+ application.The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients.
Installation
Usage
Use the library and your secret key to run:
While you can provide an api_key keyword argument, we recommend using python-dotenv to add GROQ_API_KEY="My API Key"
to your .env file so that your API Key is not stored in source control.
The following response is generated:
Groq JavaScript API Library
The Groq JavaScript library provides convenient access to the Groq REST API from server-side TypeScript or JavaScript.
Installation
Usage
Use the library and your secret key to run:
The following response is generated:
The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients.
Groq community libraries
Groq encourages our developer community to build on our SDK. If you would like your library added, please fill out this form.
Please note that Groq does not verify the security of these projects. Use at your own risk.
C#
jgravelle.GroqAPILibrary by jgravelle
Dart/Flutter
TAGonSoft.groq-dart by TAGonSoft
PHP
lucianotonet.groq-php by lucianotonet