data
Together AI CLI for AI Agents
Use the Together AI CLI from KosmoKrator to call Together AI tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Together AI CLI Setup
Together AI can be configured headlessly with `kosmokrator integrations:configure together-ai`.
# 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 together-ai --set api_key="$TOGETHER_AI_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor together-ai --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 | TOGETHER_AI_API_KEY | Secret secret | yes | API Key |
url | TOGETHER_AI_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 together-ai.togetherai_list_models '{}' --json kosmo integrations:together-ai togetherai_list_models '{}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs together-ai --json
kosmo integrations:docs together-ai.togetherai_list_models --json
kosmo integrations:schema together-ai.togetherai_list_models --json
kosmo integrations:search "Together AI" --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.
together-ai.togetherai_list_models
List all available AI models on Together AI, including open-source and fine-tuned models. Returns model IDs, types, pricing, and capabilities.
read - Parameters
- none
kosmo integrations:call together-ai.togetherai_list_models '{}' --json kosmo integrations:together-ai togetherai_list_models '{}' --json together-ai.togetherai_create_completion
Create a chat completion using a Together AI model. Send a conversation with messages and receive a generated response. Supports models like Llama, Mixtral, Qwen, DBRX, and more.
write - Parameters
- model, messages, max_tokens, temperature, top_p, top_k, frequency_penalty, presence_penalty, stop
kosmo integrations:call together-ai.togetherai_create_completion '{"model":"example_model","messages":"example_messages","max_tokens":1,"temperature":1,"top_p":1,"top_k":1,"frequency_penalty":1,"presence_penalty":1}' --json kosmo integrations:together-ai togetherai_create_completion '{"model":"example_model","messages":"example_messages","max_tokens":1,"temperature":1,"top_p":1,"top_k":1,"frequency_penalty":1,"presence_penalty":1}' --json together-ai.togetherai_list_fine_tunes
List all fine-tuning jobs on Together AI. Returns job IDs, status, base model, training file, and creation timestamps.
read - Parameters
- none
kosmo integrations:call together-ai.togetherai_list_fine_tunes '{}' --json kosmo integrations:together-ai togetherai_list_fine_tunes '{}' --json together-ai.togetherai_get_fine_tune
Get details of a specific fine-tuning job on Together AI. Returns status, training progress, hyperparameters, and the output model ID once complete.
read - Parameters
- fine_tune_id
kosmo integrations:call together-ai.togetherai_get_fine_tune '{"fine_tune_id":"example_fine_tune_id"}' --json kosmo integrations:together-ai togetherai_get_fine_tune '{"fine_tune_id":"example_fine_tune_id"}' --json together-ai.togetherai_list_files
List all files uploaded to Together AI. Returns file IDs, filenames, sizes, and purposes (e.g. fine-tune training data, results).
read - Parameters
- none
kosmo integrations:call together-ai.togetherai_list_files '{}' --json kosmo integrations:together-ai togetherai_list_files '{}' --json together-ai.togetherai_get_file
Get details of a specific file on Together AI. Returns file metadata including name, size, purpose, and creation date.
read - Parameters
- file_id
kosmo integrations:call together-ai.togetherai_get_file '{"file_id":"example_file_id"}' --json kosmo integrations:together-ai togetherai_get_file '{"file_id":"example_file_id"}' --json together-ai.togetherai_get_current_user
Get the authenticated Together AI user's account information, including name, email, and plan details.
read - Parameters
- none
kosmo integrations:call together-ai.togetherai_get_current_user '{}' --json kosmo integrations:together-ai togetherai_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
together-ai.togetherai_list_models 0 parameters
kosmo integrations:schema together-ai.togetherai_list_models --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
together-ai.togetherai_create_completion 9 parameters
kosmo integrations:schema together-ai.togetherai_create_completion --json | Parameter | Type | Required | Description |
|---|---|---|---|
model | string | yes | The model ID to use (e.g. "meta-llama/Llama-3.3-70B-Instruct-Turbo", "mistralai/Mixtral-8x7B-Instruct-v0.1"). |
messages | array | yes | Array of message objects with "role" (system, user, assistant) and "content" fields. |
max_tokens | integer | no | Maximum number of tokens to generate in the response. |
temperature | number | no | Sampling temperature (0.0–2.0). Higher values increase randomness. Defaults to 0.7. |
top_p | number | no | Nucleus sampling threshold (0.0–1.0). Defaults to 0.7. |
top_k | integer | no | Top-k sampling parameter. Limits tokens considered at each step. |
frequency_penalty | number | no | Penalize tokens based on frequency (-2.0 to 2.0). |
presence_penalty | number | no | Penalize tokens based on presence (-2.0 to 2.0). |
stop | array | no | Array of stop sequences. Generation stops when any sequence is encountered. |
together-ai.togetherai_list_fine_tunes 0 parameters
kosmo integrations:schema together-ai.togetherai_list_fine_tunes --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
together-ai.togetherai_get_fine_tune 1 parameters
kosmo integrations:schema together-ai.togetherai_get_fine_tune --json | Parameter | Type | Required | Description |
|---|---|---|---|
fine_tune_id | string | yes | The fine-tuning job ID (e.g. "ft-abc123"). |
together-ai.togetherai_list_files 0 parameters
kosmo integrations:schema together-ai.togetherai_list_files --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
together-ai.togetherai_get_file 1 parameters
kosmo integrations:schema together-ai.togetherai_get_file --json | Parameter | Type | Required | Description |
|---|---|---|---|
file_id | string | yes | The file ID to retrieve. |
together-ai.togetherai_get_current_user 0 parameters
kosmo integrations:schema together-ai.togetherai_get_current_user --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.