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 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.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
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.
kosmo integrations:call groq.groq_list_models '{}' --json 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.
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 - Parameters
- none
kosmo integrations:call groq.groq_list_models '{}' --json kosmo integrations:groq groq_list_models '{}' --json groq.groq_get_model
Retrieve a Groq model by ID.
read - Parameters
- none
kosmo integrations:call groq.groq_get_model '{}' --json 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 - Parameters
- model, messages, temperature, max_tokens, top_p, stream
kosmo integrations:call groq.groq_create_completion '{"model":"example_model","messages":"example_messages","temperature":1,"max_tokens":1,"top_p":1,"stream":true}' --json 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 - Parameters
- none
kosmo integrations:call groq.groq_create_response '{}' --json kosmo integrations:groq groq_create_response '{}' --json groq.groq_create_transcription
Transcribe audio with Groq.
write - Parameters
- none
kosmo integrations:call groq.groq_create_transcription '{}' --json kosmo integrations:groq groq_create_transcription '{}' --json groq.groq_create_translation
Translate audio into English with Groq.
write - Parameters
- none
kosmo integrations:call groq.groq_create_translation '{}' --json kosmo integrations:groq groq_create_translation '{}' --json groq.groq_create_speech
Generate speech audio from text.
write - Parameters
- none
kosmo integrations:call groq.groq_create_speech '{}' --json kosmo integrations:groq groq_create_speech '{}' --json groq.groq_create_batch
Create a batch job from an uploaded JSONL file.
write - Parameters
- none
kosmo integrations:call groq.groq_create_batch '{}' --json kosmo integrations:groq groq_create_batch '{}' --json groq.groq_get_batch
Retrieve a batch job by ID.
read - Parameters
- none
kosmo integrations:call groq.groq_get_batch '{}' --json kosmo integrations:groq groq_get_batch '{}' --json groq.groq_list_batches
List Groq batch jobs.
read - Parameters
- none
kosmo integrations:call groq.groq_list_batches '{}' --json kosmo integrations:groq groq_list_batches '{}' --json groq.groq_cancel_batch
Cancel a Groq batch job.
write - Parameters
- none
kosmo integrations:call groq.groq_cancel_batch '{}' --json kosmo integrations:groq groq_cancel_batch '{}' --json groq.groq_upload_file
Upload a file for batch processing.
write - Parameters
- none
kosmo integrations:call groq.groq_upload_file '{}' --json 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 - Parameters
- purpose, limit, after
kosmo integrations:call groq.groq_list_files '{"purpose":"example_purpose","limit":1,"after":"example_after"}' --json 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 - Parameters
- file_id
kosmo integrations:call groq.groq_get_file '{"file_id":"example_file_id"}' --json kosmo integrations:groq groq_get_file '{"file_id":"example_file_id"}' --json groq.groq_download_file
Download Groq file content.
read - Parameters
- none
kosmo integrations:call groq.groq_download_file '{}' --json kosmo integrations:groq groq_download_file '{}' --json groq.groq_delete_file
Delete an uploaded Groq file.
write - Parameters
- none
kosmo integrations:call groq.groq_delete_file '{}' --json kosmo integrations:groq groq_delete_file '{}' --json groq.groq_list_fine_tunings
List Groq fine-tuning jobs.
read - Parameters
- none
kosmo integrations:call groq.groq_list_fine_tunings '{}' --json kosmo integrations:groq groq_list_fine_tunings '{}' --json groq.groq_create_fine_tuning
Create a Groq fine-tuning job.
write - Parameters
- none
kosmo integrations:call groq.groq_create_fine_tuning '{}' --json kosmo integrations:groq groq_create_fine_tuning '{}' --json groq.groq_get_fine_tuning
Retrieve a Groq fine-tuning job.
read - Parameters
- none
kosmo integrations:call groq.groq_get_fine_tuning '{}' --json kosmo integrations:groq groq_get_fine_tuning '{}' --json groq.groq_delete_fine_tuning
Delete a Groq fine-tuning job.
write - Parameters
- none
kosmo integrations:call groq.groq_delete_fine_tuning '{}' --json 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
kosmo integrations:schema groq.groq_list_models --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_get_model 0 parameters
kosmo integrations:schema groq.groq_get_model --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_create_completion 6 parameters
kosmo integrations:schema groq.groq_create_completion --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema groq.groq_create_response --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_create_transcription 0 parameters
kosmo integrations:schema groq.groq_create_transcription --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_create_translation 0 parameters
kosmo integrations:schema groq.groq_create_translation --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_create_speech 0 parameters
kosmo integrations:schema groq.groq_create_speech --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_create_batch 0 parameters
kosmo integrations:schema groq.groq_create_batch --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_get_batch 0 parameters
kosmo integrations:schema groq.groq_get_batch --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_list_batches 0 parameters
kosmo integrations:schema groq.groq_list_batches --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_cancel_batch 0 parameters
kosmo integrations:schema groq.groq_cancel_batch --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_upload_file 0 parameters
kosmo integrations:schema groq.groq_upload_file --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_list_files 3 parameters
kosmo integrations:schema groq.groq_list_files --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema groq.groq_get_file --json | Parameter | Type | Required | Description |
|---|---|---|---|
file_id | string | yes | The file identifier (e.g., "file-abc123"). |
groq.groq_download_file 0 parameters
kosmo integrations:schema groq.groq_download_file --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_delete_file 0 parameters
kosmo integrations:schema groq.groq_delete_file --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_list_fine_tunings 0 parameters
kosmo integrations:schema groq.groq_list_fine_tunings --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_create_fine_tuning 0 parameters
kosmo integrations:schema groq.groq_create_fine_tuning --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_get_fine_tuning 0 parameters
kosmo integrations:schema groq.groq_get_fine_tuning --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
groq.groq_delete_fine_tuning 0 parameters
kosmo integrations:schema groq.groq_delete_fine_tuning --json | Parameter | Type | Required | Description |
|---|---|---|---|
| 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.