groq/groq-api-cookbook
Jupyter Notebook
Captured source
source ↗published Mar 25, 2024seen 5dcaptured 15hhttp 200method plain
groq/groq-api-cookbook
Description: groq-api-cookbook
Language: Jupyter Notebook
Stars: 1371
Forks: 290
Open issues: 10
Created: 2024-03-25T15:19:21Z
Pushed: 2025-11-25T17:18:30Z
Default branch: main
Fork: no
Archived: no
README:
Groq API Cookbook
Getting Started • Tutorials • Questions • Bug Reporting • Contributing
Getting started
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? 🚀
Tutorials
01. Getting Started & Quickstart
- [Groq Quickstart Conversational Chatbot](/tutorials/01-quickstart/groq-quickstart-conversational-chatbot): Build your first conversational chatbot with Groq.
- [Chat History Management](/tutorials/01-quickstart/chat-history): Learn how to manage and persist chat history in your AI applications.
- [Batch Processing](/tutorials/01-quickstart/batch-processing): Process hundreds of requests asynchronously using Groq's batch APIs.
02. Tool Use (Function Calling)
- [eCommerce Function Calling](/tutorials/02-tool-use/function-calling-101-ecommerce): Learn how to use function calling with LLMs to create orders and get prices on products.
- [SQL Function Calling](/tutorials/02-tool-use/function-calling-sql): Learn how to use function calling with LLMs to run SQL queries.
- [Stock Market Function Calling (Tutorial)](/tutorials/02-tool-use/llama3-stock-market-function-calling): Learn how to use function calling with LLMs to parse stock market data.
- [Stock Market Function Calling (Replit)](/tutorials/02-tool-use/groqing-the-stock-market-function-calling-llama3): Replit-ready example for the above stock tutorial.
- [Parallel Tool Use](/tutorials/02-tool-use/parallel-tool-use): Learn how to equip your LLM to use multiple tools at the same time.
- [Text to SQL with JSON Mode](/tutorials/02-tool-use/text-to-sql-json-mode): Convert natural language to SQL queries using JSON mode.
- [Verified SQL Function Calling](/tutorials/02-tool-use/verified-sql-function-calling): Learn how to build verified and validated SQL queries with function calling.
03. Model Context Protocol (MCP)
- [Box MCP with Groq](/tutorials/03-mcp/mcp-box): Learn how to securely access and interact with private Box content using Groq inference + Box's hosted MCP server.
- [Browser Use MCP](/tutorials/03-mcp/mcp-browseruse): Equip models via Groq API with Browser Use's tools to enable autonomous website browsing, information extraction, and web pages interaction.
- [BrowserBase MCP](/tutorials/03-mcp/mcp-browserbase): 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](/tutorials/03-mcp/mcp-firecrawl): Equip GPT-OSS 120B via Groq API with enterprise-grade web scraping capabilities, intelligent data extraction, structured parsing, and deep web research.
- [Exa MCP](/tutorials/03-mcp/mcp-exa): 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.
- [E2B MCP Gateway](/tutorials/03-mcp/mcp-e2b): Learn how to use E2B's MCP gateway to run multiple MCP servers (Exa + Browserbase) together in an isolated sandbox for AI research workflows.
- [Tavily MCP with Groq](/tutorials/03-mcp/mcp-tavily): Build a real-time research agent with the Tavily MCP and Groq API.
- [HuggingFace MCP with Groq](/tutorials/03-mcp/mcp-huggingface): Retrieve real-time HuggingFace model data with the HuggingFace MCP and Groq API.
- [Parallel MCP with Groq](/tutorials/03-mcp/mcp-parallel): Real-time search with access to live data with the Parallel MCP and Groq API (along with a performance comparison against OpenAI).
04. Retrieval-Augmented Generation (RAG)
- [Benchmarking RAG with Langchain](/tutorials/04-rag/benchmarking-rag-langchain): Learn how to benchmark a RAG pipeline with LangChain.
- [Presidential Speeches RAG](/tutorials/04-rag/presidential-speeches-rag): Learn how to use RAG to find relevant presidential speeches from input text.
- [Presidential Speeches RAG with Pinecone](/tutorials/04-rag/presidential-speeches-rag-with-pinecone): Learn how to implement RAG using Pinecone as your vector database.
- [Whisper and RAG](/tutorials/04-rag/whisper-podcast-rag): Learn how to use a speech-to-text model and RAG to semantically search through podcast audio.
- [Chat with Website](/tutorials/04-rag/chat_with_website): Learn how to build a chatbot that can answer questions about website content using RAG.
05. Structured Output (JSON Mode)
- [JSON Mode with Health Data](/tutorials/05-structured-output/json-mode-social-determinants-of-health): Learn how to use JSON mode to generate structured health analytics from raw data.
- [Structured Output with Instructor](/tutorials/05-structured-output/structured-output-instructor): Learn how to use the Instructor library to create structured output with tools and objects.
06. Multimodal (Vision & Audio)
- [Batch Image Processing](/tutorials/06-multimodal/batch-analyze-images): Learn how to process and analyze thousands of images using Llama 4 Maverick's multimodal capabilities with Groq Batch APIs.
- [Multimodal Image Processing](/tutorials/06-multimodal/multimodal-image-processing): Process and analyze images using vision models.
- [Audio Chunking](/tutorials/06-multimodal/audio-chunking): Learn how to efficiently chunk and process audio files with Whisper, a speech-to-text model.
- [Instagram Reel Subtitler](/tutorials/06-multimodal/instagram-reel-subtitler): Learn how to automatically and instantly generate subtitles for Instagram reels using a speech-to-text model.
07. Agents & Multi-Agent Systems
- [Mixture of Agents](/tutorials/07-agents/mixture-of-agents): Learn how to create a mixture-of-agents system powered by Groq.
- [Game Recap with MoA](/tutorials/07-agents/agno-mixture-of-agents): Learn how to use a mixture-of-agents approach to generate comprehensive MLB game recaps.
- [CrewAI Mixture of Agents](/tutorials/07-agents/crewai-mixture-of-agents): Learn how to build a mixture of agents application with CrewAI.
- [CrewAI Agents (Replit)](/tutorials/07-agents/crewai-agents): Replit-ready CrewAI agent example.
- [Langroid...
Excerpt shown — open the source for the full document.