KosmoKrator

productivity

Groq CLI for AI Agents

Use the Groq CLI from KosmoKrator to call Groq tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Groq CLI Setup

Groq can be configured headlessly with `kosmokrator integrations:configure groq`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure groq --set api_key="$GROQ_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor groq --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
api_key GROQ_API_KEY Secret secret yes API Key
url GROQ_URL URL url no API Base URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call groq.groq_list_models '{}' --json
Provider shortcut
kosmo integrations:groq groq_list_models '{}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs groq --json
kosmo integrations:docs groq.groq_list_models --json
kosmo integrations:schema groq.groq_list_models --json
kosmo integrations:search "Groq" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

groq.groq_list_models

List available Groq AI models. Returns model IDs, ownership, and other metadata for models accessible via the Groq API.

Read read
Parameters
none
Generic call
kosmo integrations:call groq.groq_list_models '{}' --json
Shortcut
kosmo integrations:groq groq_list_models '{}' --json

groq.groq_get_model

Retrieve a Groq model by ID.

Read read
Parameters
none
Generic call
kosmo integrations:call groq.groq_get_model '{}' --json
Shortcut
kosmo integrations:groq groq_get_model '{}' --json

groq.groq_create_completion

Create a chat completion using a Groq model. Send a list of messages and receive an AI-generated response with ultra-low latency. Supports configurable parameters like temperature, max_tokens, and top_p.

Write write
Parameters
model, messages, temperature, max_tokens, top_p, stream
Generic call
kosmo integrations:call groq.groq_create_completion '{"model":"example_model","messages":"example_messages","temperature":1,"max_tokens":1,"top_p":1,"stream":true}' --json
Shortcut
kosmo integrations:groq groq_create_completion '{"model":"example_model","messages":"example_messages","temperature":1,"max_tokens":1,"top_p":1,"stream":true}' --json

groq.groq_create_response

Create a response through Groq beta Responses API.

Write write
Parameters
none
Generic call
kosmo integrations:call groq.groq_create_response '{}' --json
Shortcut
kosmo integrations:groq groq_create_response '{}' --json

groq.groq_create_transcription

Transcribe audio with Groq.

Write write
Parameters
none
Generic call
kosmo integrations:call groq.groq_create_transcription '{}' --json
Shortcut
kosmo integrations:groq groq_create_transcription '{}' --json

groq.groq_create_translation

Translate audio into English with Groq.

Write write
Parameters
none
Generic call
kosmo integrations:call groq.groq_create_translation '{}' --json
Shortcut
kosmo integrations:groq groq_create_translation '{}' --json

groq.groq_create_speech

Generate speech audio from text.

Write write
Parameters
none
Generic call
kosmo integrations:call groq.groq_create_speech '{}' --json
Shortcut
kosmo integrations:groq groq_create_speech '{}' --json

groq.groq_create_batch

Create a batch job from an uploaded JSONL file.

Write write
Parameters
none
Generic call
kosmo integrations:call groq.groq_create_batch '{}' --json
Shortcut
kosmo integrations:groq groq_create_batch '{}' --json

groq.groq_get_batch

Retrieve a batch job by ID.

Read read
Parameters
none
Generic call
kosmo integrations:call groq.groq_get_batch '{}' --json
Shortcut
kosmo integrations:groq groq_get_batch '{}' --json

groq.groq_list_batches

List Groq batch jobs.

Read read
Parameters
none
Generic call
kosmo integrations:call groq.groq_list_batches '{}' --json
Shortcut
kosmo integrations:groq groq_list_batches '{}' --json

groq.groq_cancel_batch

Cancel a Groq batch job.

Write write
Parameters
none
Generic call
kosmo integrations:call groq.groq_cancel_batch '{}' --json
Shortcut
kosmo integrations:groq groq_cancel_batch '{}' --json

groq.groq_upload_file

Upload a file for batch processing.

Write write
Parameters
none
Generic call
kosmo integrations:call groq.groq_upload_file '{}' --json
Shortcut
kosmo integrations:groq groq_upload_file '{}' --json

groq.groq_list_files

List files uploaded to the Groq Files API. Returns file IDs, filenames, purposes, sizes, and upload timestamps.

Read read
Parameters
purpose, limit, after
Generic call
kosmo integrations:call groq.groq_list_files '{"purpose":"example_purpose","limit":1,"after":"example_after"}' --json
Shortcut
kosmo integrations:groq groq_list_files '{"purpose":"example_purpose","limit":1,"after":"example_after"}' --json

groq.groq_get_file

Get metadata for an uploaded file in Groq, including its ID, filename, purpose, size in bytes, and processing status.

Read read
Parameters
file_id
Generic call
kosmo integrations:call groq.groq_get_file '{"file_id":"example_file_id"}' --json
Shortcut
kosmo integrations:groq groq_get_file '{"file_id":"example_file_id"}' --json

groq.groq_download_file

Download Groq file content.

Read read
Parameters
none
Generic call
kosmo integrations:call groq.groq_download_file '{}' --json
Shortcut
kosmo integrations:groq groq_download_file '{}' --json

groq.groq_delete_file

Delete an uploaded Groq file.

Write write
Parameters
none
Generic call
kosmo integrations:call groq.groq_delete_file '{}' --json
Shortcut
kosmo integrations:groq groq_delete_file '{}' --json

groq.groq_list_fine_tunings

List Groq fine-tuning jobs.

Read read
Parameters
none
Generic call
kosmo integrations:call groq.groq_list_fine_tunings '{}' --json
Shortcut
kosmo integrations:groq groq_list_fine_tunings '{}' --json

groq.groq_create_fine_tuning

Create a Groq fine-tuning job.

Write write
Parameters
none
Generic call
kosmo integrations:call groq.groq_create_fine_tuning '{}' --json
Shortcut
kosmo integrations:groq groq_create_fine_tuning '{}' --json

groq.groq_get_fine_tuning

Retrieve a Groq fine-tuning job.

Read read
Parameters
none
Generic call
kosmo integrations:call groq.groq_get_fine_tuning '{}' --json
Shortcut
kosmo integrations:groq groq_get_fine_tuning '{}' --json

groq.groq_delete_fine_tuning

Delete a Groq fine-tuning job.

Write write
Parameters
none
Generic call
kosmo integrations:call groq.groq_delete_fine_tuning '{}' --json
Shortcut
kosmo integrations:groq groq_delete_fine_tuning '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

groq.groq_list_models 0 parameters
Schema command
kosmo integrations:schema groq.groq_list_models --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_get_model 0 parameters
Schema command
kosmo integrations:schema groq.groq_get_model --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_create_completion 6 parameters
Schema command
kosmo integrations:schema groq.groq_create_completion --json
ParameterTypeRequiredDescription
model string yes The model ID to use (e.g., "llama-3.3-70b-versatile", "mixtral-8x7b-32768", "gemma2-9b-it").
messages array yes Array of message objects. Each message should have a "role" ("system", "user", or "assistant") and "content" string.
temperature number no Controls randomness in generation (0.0-2.0). Lower values are more deterministic, higher values more creative.
max_tokens integer no Maximum number of tokens to generate in the response.
top_p number no Nucleus sampling parameter (0.0-1.0). Limits cumulative probability of tokens considered.
stream boolean no Whether to stream the response. Defaults to false.
groq.groq_create_response 0 parameters
Schema command
kosmo integrations:schema groq.groq_create_response --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_create_transcription 0 parameters
Schema command
kosmo integrations:schema groq.groq_create_transcription --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_create_translation 0 parameters
Schema command
kosmo integrations:schema groq.groq_create_translation --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_create_speech 0 parameters
Schema command
kosmo integrations:schema groq.groq_create_speech --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_create_batch 0 parameters
Schema command
kosmo integrations:schema groq.groq_create_batch --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_get_batch 0 parameters
Schema command
kosmo integrations:schema groq.groq_get_batch --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_list_batches 0 parameters
Schema command
kosmo integrations:schema groq.groq_list_batches --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_cancel_batch 0 parameters
Schema command
kosmo integrations:schema groq.groq_cancel_batch --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_upload_file 0 parameters
Schema command
kosmo integrations:schema groq.groq_upload_file --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_list_files 3 parameters
Schema command
kosmo integrations:schema groq.groq_list_files --json
ParameterTypeRequiredDescription
purpose string no Filter files by purpose (e.g., "batch").
limit integer no Maximum number of files to return per page (default: 20).
after string no Cursor for pagination: file ID to start after.
groq.groq_get_file 1 parameters
Schema command
kosmo integrations:schema groq.groq_get_file --json
ParameterTypeRequiredDescription
file_id string yes The file identifier (e.g., "file-abc123").
groq.groq_download_file 0 parameters
Schema command
kosmo integrations:schema groq.groq_download_file --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_delete_file 0 parameters
Schema command
kosmo integrations:schema groq.groq_delete_file --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_list_fine_tunings 0 parameters
Schema command
kosmo integrations:schema groq.groq_list_fine_tunings --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_create_fine_tuning 0 parameters
Schema command
kosmo integrations:schema groq.groq_create_fine_tuning --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_get_fine_tuning 0 parameters
Schema command
kosmo integrations:schema groq.groq_get_fine_tuning --json
ParameterTypeRequiredDescription
No parameters.
groq.groq_delete_fine_tuning 0 parameters
Schema command
kosmo integrations:schema groq.groq_delete_fine_tuning --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.