Groq
The Groq piece in ZBrain Flow connects with Groq’s fast language processing models, enabling quick and efficient AI interactions. This piece supports a range of actions, including querying AI, transcribing audio, translating audio to English, and making custom API calls to Groq endpoints. It is useful for users who need fast, AI-powered processing for text or audio data within automated workflows.
How to use Groq in ZBrain Flow
Select Groq as your connection
Click on the '+' button in the Flow and search for Groq.
Select Groq.
Decide on the action you need, then select it. ZBrain Flow provides several options:
Ask AI – Interact with Groq’s fast language models by sending prompts.
Transcribe audio – Convert audio into text in the same language.
Translate audio – Convert non-English audio into English text.
Custom API call – Send custom requests to Groq’s API using any valid endpoint.
How to connect to the Groq AI platform
Before using any Groq actions in ZBrain Flow, you'll need to set up a connection to your Groq account. This is a one-time setup that will allow you to access Groq's AI models securely.
To create your Groq connection:
From any Groq action, click on the ‘API Key’ dropdown and select 'Create connection'.
In the pop-up window that appears, you'll need to:
Enter a descriptive 'Connection Name' to identify this Groq connection
In the 'API Key' field, enter your Groq API key
Click 'Save' to store this connection
To obtain your Groq API key:
Navigate to the ‘API Keys’ section.
Click on 'Create API Key'.
In the pop-up window, enter a name for the key in the ‘Display name for the key’ field (e.g., ‘AI Content Labs’) to help identify it later.
Click 'Submit'.
Copy the API key shown. Note: This key will only be displayed once, so save it securely.
How to use Groq’s ask AI action
Follow the connection setup steps mentioned earlier under ‘How to connect to the Groq AI platform.’
Once connected, configure the fields as follows:
In the ‘Model’ field, select the model you want to use for generating completions.
In the ‘Question’ field, enter the input you want the model to respond to.
Set the value in the ‘Temperature’ field to control randomness. Lower values result in more focused and deterministic responses.
Set the ‘Maximum Tokens’ field to define how long the generated response can be.
Use the ‘Top P’ field if you're using nucleus sampling. This limits the selection of tokens based on cumulative probability.
Use the ‘Frequency penalty’ field to reduce the chance of repeated content.
Use the ‘Presence penalty’ field to encourage the model to introduce new topics.
If you want the model to retain chat context across different runs, enter a value in the ‘Memory Key’ field. Leave it empty for stateless responses.
In the ‘Roles’ field, define an array of role-based messages (e.g., system, user, assistant) to provide context or structure to the conversation.
How to use Groq’s transcribe audio action
Follow the connection setup instructions from the "How to connect to the Groq AI platform" section above.
Once your connection is ready, complete the following steps:
In the ‘Audio File’ field, upload or provide a valid audio file in one of the supported formats: FLAC, MP3, MP4, MPEG, MPGA, M4A, OGG, WAV, or WebM.
In the ‘Model’ field, select the transcription model you want to use.
In the ‘Language’ field, enter the ISO-639-1 language code of the input audio (e.g., 'en' for English).
If needed, add a reference text in the ‘Prompt’ field to help guide the model (optional).
Set the ‘Temperature’ to control the randomness of the transcription (range: 0 to 1). Lower values make the output more focused.
Choose your preferred output format in the ‘Response Format’ field. The options include JSON, text, and Verbose JSON.
How to use Groq’s translate audio action
To translate audio using Groq, follow the same steps as in the ‘How to use Groq’s transcribe audio action’ section above.
While the overall process is identical, note that the 'Translate Audio' action does not include the 'Language' field. So, you can omit the step where you're asked to input the ISO-639-1 language code. All other fields — such as ‘Audio File’, ‘Model’, ‘Prompt’, ‘Temperature’, and ‘Response Format’ — remain the same. Configure them as needed to process and translate your audio into English.
How to use Groq’s custom API call in ZBrain Flow
Follow the connection setup instructions from the "How to connect to the Groq AI platform" section above.
In the ‘URL’ field, enter the complete endpoint (e.g.,
https://api.groq.com/openai/v1
) or a relative path.Choose the appropriate HTTP request type in the ‘Method’ field (GET, POST, etc.).
Click ‘Add Item’ in the ‘Headers’ section to add any custom headers if needed. Authorization headers are injected automatically based on your connection, so you don’t need to include them manually.
(Optional) Use the ‘Query Parameters’ section to include any key-value pairs required by your API call.
Add the request payload in the ‘Body’ field. This is usually in JSON format.
Enable the ‘No Error on Failure’ option if you want the flow to continue even when the API call fails. It prevents the flow from stopping due to an error response.
In the ‘Timeout (in seconds)’ field, specify how long ZBrain should wait for a response from the API before timing out. Use this to handle slow or large requests.
Last updated