KosmoKrator

communication

BlandAI CLI for AI Agents

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

5 functions 4 read 1 write API key auth

BlandAI CLI Setup

BlandAI can be configured headlessly with `kosmokrator integrations:configure blandai`.

# 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 blandai --set api_key="$BLANDAI_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor blandai --json
kosmokrator integrations:status --json

Credentials

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

KeyEnv varTypeRequiredLabel
api_key BLANDAI_API_KEY Secret secret yes API Key
url BLANDAI_URL URL url no API Base URL

Call BlandAI Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call blandai.blandai_make_call '{
  "phone_number": "example_phone_number",
  "task": "example_task",
  "voice": "example_voice",
  "wait_for_greeting": true,
  "record": true,
  "max_duration": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:blandai blandai_make_call '{
  "phone_number": "example_phone_number",
  "task": "example_task",
  "voice": "example_voice",
  "wait_for_greeting": true,
  "record": true,
  "max_duration": 1
}' --json

Agent Discovery Commands

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

kosmo integrations:docs blandai --json
kosmo integrations:docs blandai.blandai_make_call --json
kosmo integrations:schema blandai.blandai_make_call --json
kosmo integrations:search "BlandAI" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to BlandAI.

blandai.blandai_make_call

Write write

Initiate an AI-powered phone call via BlandAI. The AI agent will follow the provided task instructions and speak using the specified voice.

Parameters
phone_number, task, voice, wait_for_greeting, record, max_duration

Generic CLI call

kosmo integrations:call blandai.blandai_make_call '{"phone_number":"example_phone_number","task":"example_task","voice":"example_voice","wait_for_greeting":true,"record":true,"max_duration":1}' --json

Provider shortcut

kosmo integrations:blandai blandai_make_call '{"phone_number":"example_phone_number","task":"example_task","voice":"example_voice","wait_for_greeting":true,"record":true,"max_duration":1}' --json

blandai.blandai_get_call

Read read

Retrieve details for a specific BlandAI phone call, including status, transcript, duration, and metadata.

Parameters
call_id

Generic CLI call

kosmo integrations:call blandai.blandai_get_call '{"call_id":"example_call_id"}' --json

Provider shortcut

kosmo integrations:blandai blandai_get_call '{"call_id":"example_call_id"}' --json

blandai.blandai_list_calls

Read read

List BlandAI phone calls with optional pagination. Returns call summaries including status, duration, and phone numbers.

Parameters
limit, offset

Generic CLI call

kosmo integrations:call blandai.blandai_list_calls '{"limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:blandai blandai_list_calls '{"limit":1,"offset":1}' --json

blandai.blandai_analyze_call

Read read

Analyze a BlandAI call transcript with a custom prompt. Extract insights, summarize the conversation, or evaluate call outcomes.

Parameters
call_id, prompt

Generic CLI call

kosmo integrations:call blandai.blandai_analyze_call '{"call_id":"example_call_id","prompt":"example_prompt"}' --json

Provider shortcut

kosmo integrations:blandai blandai_analyze_call '{"call_id":"example_call_id","prompt":"example_prompt"}' --json

blandai.blandai_get_current_user

Read read

Get the authenticated BlandAI user's account information. Useful for verifying credentials and checking account details.

Parameters
none

Generic CLI call

kosmo integrations:call blandai.blandai_get_current_user '{}' --json

Provider shortcut

kosmo integrations:blandai blandai_get_current_user '{}' --json

Function Schemas

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

blandai.blandai_make_call

Initiate an AI-powered phone call via BlandAI. The AI agent will follow the provided task instructions and speak using the specified voice.

Operation
Write write
Schema command
kosmo integrations:schema blandai.blandai_make_call --json
ParameterTypeRequiredDescription
phone_number string yes The phone number to call in E.164 format (e.g., "+1234567890").
task string yes Instructions or task description for the AI agent to follow during the call.
voice string no Voice identifier to use for the call (e.g., a voice name or ID). Leave empty for the default voice.
wait_for_greeting boolean no Whether to wait for the callee to speak first before the AI begins (default: false).
record boolean no Whether to record the call (default: true).
max_duration integer no Maximum call duration in minutes.

blandai.blandai_get_call

Retrieve details for a specific BlandAI phone call, including status, transcript, duration, and metadata.

Operation
Read read
Schema command
kosmo integrations:schema blandai.blandai_get_call --json
ParameterTypeRequiredDescription
call_id string yes The unique identifier of the call to retrieve.

blandai.blandai_list_calls

List BlandAI phone calls with optional pagination. Returns call summaries including status, duration, and phone numbers.

Operation
Read read
Schema command
kosmo integrations:schema blandai.blandai_list_calls --json
ParameterTypeRequiredDescription
limit integer no Maximum number of calls to return (default: 50).
offset integer no Number of calls to skip for pagination (default: 0).

blandai.blandai_analyze_call

Analyze a BlandAI call transcript with a custom prompt. Extract insights, summarize the conversation, or evaluate call outcomes.

Operation
Read read
Schema command
kosmo integrations:schema blandai.blandai_analyze_call --json
ParameterTypeRequiredDescription
call_id string yes The unique identifier of the call to analyze.
prompt string yes Analysis prompt describing what to extract or evaluate from the transcript (e.g., "Summarize the key points discussed", "Was the customer satisfied?").

blandai.blandai_get_current_user

Get the authenticated BlandAI user's account information. Useful for verifying credentials and checking account details.

Operation
Read read
Schema command
kosmo integrations:schema blandai.blandai_get_current_user --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.