Getting Started • Tutorials • Questions • Bug Reporting • Contributing
This repository contains a collection of tutorials, sample code, and guidelines for accomplishing tasks with Groq API. To run these examples, you'll need a Groq API key that you can get for free by creating an account here. Are you ready to cook? 🚀
- Groq Quickstart Conversational Chatbot: Build your first conversational chatbot with Groq.
- Chat History Management: Learn how to manage and persist chat history in your AI applications.
- Batch Processing: Process hundreds of requests asynchronously using Groq's batch APIs.
- eCommerce Function Calling: Learn how to use function calling with LLMs to create orders and get prices on products.
- SQL Function Calling: Learn how to use function calling with LLMs to run SQL queries.
- Stock Market Function Calling (Tutorial): Learn how to use function calling with LLMs to parse stock market data.
- Stock Market Function Calling (Replit): Replit-ready example for the above stock tutorial.
- Parallel Tool Use: Learn how to equip your LLM to use multiple tools at the same time.
- Text to SQL with JSON Mode: Convert natural language to SQL queries using JSON mode.
- Verified SQL Function Calling: Learn how to build verified and validated SQL queries with function calling.
- Box MCP with Groq: Learn how to securely access and interact with private Box content using Groq inference + Box's hosted MCP server.
- Browser Use MCP: Equip models via Groq API with Browser Use's tools to enable autonomous website browsing, information extraction, and web pages interaction.
- BrowserBase MCP: Equip models via Groq API with Browserbase's MCP server for web automation using natural language commands, including tools for web interaction and data extraction.
- Firecrawl MCP: Equip GPT-OSS 120B via Groq API with enterprise-grade web scraping capabilities, intelligent data extraction, structured parsing, and deep web research.
- Exa MCP: Use Exa's web search and web crawling tools to get real-time information from the internet. Find relevant search results, extract data from websites, and run deep-research.
- Tavily MCP with Groq: Build a real-time research agent with the Tavily MCP and Groq API.
- HuggingFace MCP with Groq: Retrieve real-time HuggingFace model data with the HuggingFace MCP and Groq API.
- Parallel MCP with Groq: Real-time search with access to live data with the Parallel MCP and Groq API (along with a performance comparison against OpenAI).
- Benchmarking RAG with Langchain: Learn how to benchmark a RAG pipeline with LangChain.
- Presidential Speeches RAG: Learn how to use RAG to find relevant presidential speeches from input text.
- Presidential Speeches RAG with Pinecone: Learn how to implement RAG using Pinecone as your vector database.
- Whisper and RAG: Learn how to use a speech-to-text model and RAG to semantically search through podcast audio.
- Chat with Website: Learn how to build a chatbot that can answer questions about website content using RAG.
- JSON Mode with Health Data: Learn how to use JSON mode to generate structured health analytics from raw data.
- Structured Output with Instructor: Learn how to use the Instructor library to create structured output with tools and objects.
- Batch Image Processing: Learn how to process and analyze thousands of images using Llama 4 Maverick's multimodal capabilities with Groq Batch APIs.
- Multimodal Image Processing: Process and analyze images using vision models.
- Audio Chunking: Learn how to efficiently chunk and process audio files with Whisper, a speech-to-text model.
- Instagram Reel Subtitler: Learn how to automatically and instantly generate subtitles for Instagram reels using a speech-to-text model.
- Mixture of Agents: Learn how to create a mixture-of-agents system powered by Groq.
- Game Recap with MoA: Learn how to use a mixture-of-agents approach to generate comprehensive MLB game recaps.
- CrewAI Mixture of Agents: Learn how to build a mixture of agents application with CrewAI.
- CrewAI Agents (Replit): Replit-ready CrewAI agent example.
- Langroid LLM Agents: Learn how to create a multi-agent system using Langroid and Groq.
- Composio Newsletter Summarizer Agent: Build an agent that summarizes newsletters using Composio and Groq.
- aiXplain Agents: Build intelligent agents using aiXplain's platform with Groq.
- Minions with Groq: Create lightweight agent workers (minions) for distributed tasks.
- Gradio with Groq: Learn how to build a full-stack application with Gradio powered by Groq.
- Streamlit with Groq: Learn how to build a full-stack chat application with Streamlit powered by Groq.
- LangChain Conversational Chatbot: Build conversational chatbots using LangChain and Groq.
- LlamaIndex Conversational Chatbot: Create chat applications using LlamaIndex with Groq.
- Portkey with Groq: Learn how to integrate Portkey for AI observability into Groq usage.
- Portkey: OpenAI to Groq Migration: Learn how to seamlessly migrate from OpenAI to Groq using Portkey.
- E2B Code Interpreting: Learn how to integrate code execution for LLMs with the Code Interpreter SDK by E2B.
- JigsawStack Prompt Engine: Learn how to automate your workflow and choose the best LLM for your prompts using JigsawStack's Prompt Engine powered by Groq.
- JigsawStack Prompt Engine (Replit): Replit-ready JigsawStack example.
- LiteLLM Proxy with Groq: Learn how to call Groq API through the LiteLLM proxy.
- Toolhouse with Groq: Learn how to use Toolhouse to create simple tool integrations with Groq.
- OpenTelemetry with Groq: Learn how to integrate OpenTelemetry tracing and metrics for insights into Groq usage.
- Arize Phoenix: Evaluate Groq Agents: Learn how to evaluate and monitor your Groq-powered agents using Arize Phoenix.
- Content Filtering with Llama Guard: Learn how to use Llama Guard to help prevent abuse and engagement with inappropriate content.
- Image Moderation: Learn how to implement image moderation and content filtering for visual content.
Join our Developer Community Forum where we discuss new features and news in the AI industry, share guidance, and collaborate.
Open an issue on GitHub here.
The Groq API Cookbook is community-driven and we are always looking for contributions in the forms of ideas, fixes, improvements, or suggestions! We greatly appreciate the open-source community and are committed to helping our community get good resources.
If you're interested in contributing to our cookbook, please first check out our contribution guidelines. We welcome high-quality guides and examples that will help our community and can't wait to see what you cook up! 🧑🍳
If there are guides or examples that you'd like to see in the future, feel free to make a suggestion here.