Free AI Implementation Guide

Make your first API call to Groq/Llama (for free)

Nov 18, 2024

If you're ready to move beyond interacting with LLM-powered chatbots like ChatGPT and into using the power of LLMs inside your personal automations, then it's time to start making API connections.

OpenAI (the maker of ChatGPT) provides a great API for accessing the ChatGPT AI models, but unfortunately it requires a credit card to sign up. So today I'm going to show you a free way to get access to powerful LLM chat models that you can do 100% for free.

Meet Groq

Groq provides access to it's model through what's called an "inference endpoint". This means that they do all the difficult work of hosting the models and keeping them up to date. You just need to sign up for an account, get an API access key, and you can begin plugging AI into your business automations. Groq is unique in that they provide access to a bunch of great open source models like Llama.

Sign up and Generate an API Token

Head to https://console.groq.com/login and create an account. No credit card is needed.

Once you're logged in, all you need in order to start using Groq from your automations is an API key. Hit the API Keys link on the menu.

Then select the "Create API Key" button.

Make sure to save this token somewhere secure.

Ok, let's try it out

I'm going to demonstrate a quick API call to Groq using Google Docs and the Make automation framework. If you haven't got a Make account yet, you can sign up here: https://www.make.com/

From inside of our Make dashboard, click "Create a new scenario" in the upper right of the screen.

Now, search for "groq" and choose "Create a Chat Completion".

Under "Connection", click "Add", and put your "API Key" into the input box. You can name it whatever you want.

Choose a model. I'll use the llama-3.1-70b-versatile.

Then add in two messages, one for "System" and one for "User". I'm hard-coding the user message here, but in a full setup, you would bring this message in from an outside source.

Then choose "Run once".

You'll see Groq thinking, and then finally the output.

That's it! You successfully connected to your free Groq API connection from an automation platform. You have now unlocked an insane power that you will soon discover to be the key to revolutionizing your business processes with AI!

Take it a step further

You've already got the integration fully working. If you want to take it a step further and output this to a Google Doc (as one of a million possible options), you just need to add another connection.

First, click the plus sign that says "Add another module".

Search for "Google docs" and choose "Create a Document"

Follow the prompts to make a Google Drive connection like we did with Groq.

Give your doc a name. Here I'm hard-coding "Doge Wisdom " and then dragging the "created" timestamp into the name input to make sure it's unique. For Content, I'm taking the first element in the "choices.message.content" output.

Choose an output location. Since it's a test, you can just use the root of Google Drive and delete after.

Click "OK".

Then "Run Once"

Head into your Google Drive and boom, that's some Doge Wisdom right there!