KosmoKrator

productivity

Bland AI CLI for AI Agents

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

Bland AI CLI Setup

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

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 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 reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
api_key BLANDAI_API_KEY Secret secret yes API Key
url BLANDAI_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 blandai.blandai_make_call '{"phone_number":"example_phone_number","task":"example_task","pathway_id":"example_pathway_id","voice":"example_voice","first_sentence":"example_first_sentence","model":"example_model","language":"example_language","wait_for_greeting":true}' --json
Provider shortcut
kosmo integrations:blandai blandai_make_call '{"phone_number":"example_phone_number","task":"example_task","pathway_id":"example_pathway_id","voice":"example_voice","first_sentence":"example_first_sentence","model":"example_model","language":"example_language","wait_for_greeting":true}' --json

Discovery

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

Discovery commands
kosmo integrations:docs blandai --json
kosmo integrations:docs blandai.blandai_make_call --json
kosmo integrations:schema blandai.blandai_make_call --json
kosmo integrations:search "Bland 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.

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.

Write write
Parameters
phone_number, task, pathway_id, voice, first_sentence, model, language, wait_for_greeting, record, max_duration, from, request_data, metadata, webhook
Generic call
kosmo integrations:call blandai.blandai_make_call '{"phone_number":"example_phone_number","task":"example_task","pathway_id":"example_pathway_id","voice":"example_voice","first_sentence":"example_first_sentence","model":"example_model","language":"example_language","wait_for_greeting":true}' --json
Shortcut
kosmo integrations:blandai blandai_make_call '{"phone_number":"example_phone_number","task":"example_task","pathway_id":"example_pathway_id","voice":"example_voice","first_sentence":"example_first_sentence","model":"example_model","language":"example_language","wait_for_greeting":true}' --json

blandai.blandai_get_call

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

Read read
Parameters
call_id
Generic call
kosmo integrations:call blandai.blandai_get_call '{"call_id":"example_call_id"}' --json
Shortcut
kosmo integrations:blandai blandai_get_call '{"call_id":"example_call_id"}' --json

blandai.blandai_list_calls

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

Read read
Parameters
limit, after, from_number, to_number, batch_id, start_date, end_date
Generic call
kosmo integrations:call blandai.blandai_list_calls '{"limit":1,"after":"example_after","from_number":"example_from_number","to_number":"example_to_number","batch_id":"example_batch_id","start_date":"example_start_date","end_date":"example_end_date"}' --json
Shortcut
kosmo integrations:blandai blandai_list_calls '{"limit":1,"after":"example_after","from_number":"example_from_number","to_number":"example_to_number","batch_id":"example_batch_id","start_date":"example_start_date","end_date":"example_end_date"}' --json

blandai.blandai_stop_call

Stop an active Bland AI call by call ID.

Write write
Parameters
call_id
Generic call
kosmo integrations:call blandai.blandai_stop_call '{"call_id":"example_call_id"}' --json
Shortcut
kosmo integrations:blandai blandai_stop_call '{"call_id":"example_call_id"}' --json

blandai.blandai_stop_all_active_calls

Stop all currently active Bland AI calls on the account.

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

blandai.blandai_analyze_call

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

Read read
Parameters
call_id, goal, questions, prompt
Generic call
kosmo integrations:call blandai.blandai_analyze_call '{"call_id":"example_call_id","goal":"example_goal","questions":"example_questions","prompt":"example_prompt"}' --json
Shortcut
kosmo integrations:blandai blandai_analyze_call '{"call_id":"example_call_id","goal":"example_goal","questions":"example_questions","prompt":"example_prompt"}' --json

blandai.blandai_create_batch

Create a Bland AI batch or campaign with phone numbers, shared call params, and optional sequence.

Write write
Parameters
name, phone_numbers, call_params, sequence
Generic call
kosmo integrations:call blandai.blandai_create_batch '{"name":"example_name","phone_numbers":"example_phone_numbers","call_params":"example_call_params","sequence":"example_sequence"}' --json
Shortcut
kosmo integrations:blandai blandai_create_batch '{"name":"example_name","phone_numbers":"example_phone_numbers","call_params":"example_call_params","sequence":"example_sequence"}' --json

blandai.blandai_list_batches

List Bland AI batches and campaigns.

Read read
Parameters
take, skip
Generic call
kosmo integrations:call blandai.blandai_list_batches '{"take":1,"skip":1}' --json
Shortcut
kosmo integrations:blandai blandai_list_batches '{"take":1,"skip":1}' --json

blandai.blandai_list_voices

List Bland AI voices available for calls.

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

blandai.blandai_get_voice

Get details for a Bland AI voice by name or ID.

Read read
Parameters
voice_id
Generic call
kosmo integrations:call blandai.blandai_get_voice '{"voice_id":"example_voice_id"}' --json
Shortcut
kosmo integrations:blandai blandai_get_voice '{"voice_id":"example_voice_id"}' --json

blandai.blandai_list_knowledge_bases

List Bland AI knowledge bases for the authenticated organization.

Read read
Parameters
limit, offset, status
Generic call
kosmo integrations:call blandai.blandai_list_knowledge_bases '{"limit":1,"offset":1,"status":"example_status"}' --json
Shortcut
kosmo integrations:blandai blandai_list_knowledge_bases '{"limit":1,"offset":1,"status":"example_status"}' --json

blandai.blandai_create_text_knowledge_base

Create a Bland AI text knowledge base from plain text.

Write write
Parameters
name, text, description
Generic call
kosmo integrations:call blandai.blandai_create_text_knowledge_base '{"name":"example_name","text":"example_text","description":"example_description"}' --json
Shortcut
kosmo integrations:blandai blandai_create_text_knowledge_base '{"name":"example_name","text":"example_text","description":"example_description"}' --json

blandai.blandai_update_knowledge_base

Update a Bland AI knowledge base name and/or description.

Write write
Parameters
knowledge_base_id, name, description
Generic call
kosmo integrations:call blandai.blandai_update_knowledge_base '{"knowledge_base_id":"example_knowledge_base_id","name":"example_name","description":"example_description"}' --json
Shortcut
kosmo integrations:blandai blandai_update_knowledge_base '{"knowledge_base_id":"example_knowledge_base_id","name":"example_name","description":"example_description"}' --json

blandai.blandai_chat_knowledge_base

Ask a question or continue a chat against a Bland AI knowledge base.

Write write
Parameters
knowledge_base_id, messages
Generic call
kosmo integrations:call blandai.blandai_chat_knowledge_base '{"knowledge_base_id":"example_knowledge_base_id","messages":"example_messages"}' --json
Shortcut
kosmo integrations:blandai blandai_chat_knowledge_base '{"knowledge_base_id":"example_knowledge_base_id","messages":"example_messages"}' --json

blandai.blandai_create_tool

Create a Bland AI custom tool for call agents.

Write write
Parameters
name, description, url, method, headers, body, query
Generic call
kosmo integrations:call blandai.blandai_create_tool '{"name":"example_name","description":"example_description","url":"example_url","method":"example_method","headers":"example_headers","body":"example_body","query":"example_query"}' --json
Shortcut
kosmo integrations:blandai blandai_create_tool '{"name":"example_name","description":"example_description","url":"example_url","method":"example_method","headers":"example_headers","body":"example_body","query":"example_query"}' --json

blandai.blandai_get_current_user

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

Read read
Parameters
none
Generic call
kosmo integrations:call blandai.blandai_get_current_user '{}' --json
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 14 parameters
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 no Instructions or task description for the AI agent to follow during the call.
pathway_id string no Conversational pathway ID. Required when task is omitted.
voice string no Voice identifier to use for the call (e.g., a voice name or ID). Leave empty for the default voice.
first_sentence string no Optional first sentence the AI should say.
model string no Optional model name.
language string no Optional call language.
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.
from string no Outbound caller ID number.
request_data object no Variables available to the call agent.
metadata object no Metadata stored with the call.
webhook string no Webhook URL for call events.
blandai.blandai_get_call 1 parameters
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 7 parameters
Schema command
kosmo integrations:schema blandai.blandai_list_calls --json
ParameterTypeRequiredDescription
limit integer no Maximum number of calls to return (default: 50).
after string no Cursor value from the previous response.
from_number string no Filter by dispatching phone number.
to_number string no Filter by called phone number.
batch_id string no Filter by batch ID.
start_date string no Start date/time filter.
end_date string no End date/time filter.
blandai.blandai_stop_call 1 parameters
Schema command
kosmo integrations:schema blandai.blandai_stop_call --json
ParameterTypeRequiredDescription
call_id string yes Call ID to stop.
blandai.blandai_stop_all_active_calls 0 parameters
Schema command
kosmo integrations:schema blandai.blandai_stop_all_active_calls --json
ParameterTypeRequiredDescription
No parameters.
blandai.blandai_analyze_call 4 parameters
Schema command
kosmo integrations:schema blandai.blandai_analyze_call --json
ParameterTypeRequiredDescription
call_id string yes The unique identifier of the call to analyze.
goal string no Overall purpose of the analysis.
questions array no Array of [question, expected_type] pairs.
prompt string no Backward-compatible alias for goal when questions are omitted.
blandai.blandai_create_batch 4 parameters
Schema command
kosmo integrations:schema blandai.blandai_create_batch --json
ParameterTypeRequiredDescription
name string yes Batch/campaign name.
phone_numbers array yes Array of phone number objects.
call_params object no Shared Send Call parameters applied to each call.
sequence object no Optional campaign retry sequence.
blandai.blandai_list_batches 2 parameters
Schema command
kosmo integrations:schema blandai.blandai_list_batches --json
ParameterTypeRequiredDescription
take integer no Number of batches to return.
skip integer no Number of batches to skip.
blandai.blandai_list_voices 0 parameters
Schema command
kosmo integrations:schema blandai.blandai_list_voices --json
ParameterTypeRequiredDescription
No parameters.
blandai.blandai_get_voice 1 parameters
Schema command
kosmo integrations:schema blandai.blandai_get_voice --json
ParameterTypeRequiredDescription
voice_id string yes Voice name or ID.
blandai.blandai_list_knowledge_bases 3 parameters
Schema command
kosmo integrations:schema blandai.blandai_list_knowledge_bases --json
ParameterTypeRequiredDescription
limit integer no Optional page size.
offset integer no Optional offset.
status string no Optional status filter.
blandai.blandai_create_text_knowledge_base 3 parameters
Schema command
kosmo integrations:schema blandai.blandai_create_text_knowledge_base --json
ParameterTypeRequiredDescription
name string yes Knowledge base name.
text string yes Knowledge base text content.
description string no Optional description.
blandai.blandai_update_knowledge_base 3 parameters
Schema command
kosmo integrations:schema blandai.blandai_update_knowledge_base --json
ParameterTypeRequiredDescription
knowledge_base_id string yes Knowledge base ID.
name string no New knowledge base name.
description string no New description.
blandai.blandai_chat_knowledge_base 2 parameters
Schema command
kosmo integrations:schema blandai.blandai_chat_knowledge_base --json
ParameterTypeRequiredDescription
knowledge_base_id string yes Knowledge base ID.
messages array yes Chat messages with role and content.
blandai.blandai_create_tool 7 parameters
Schema command
kosmo integrations:schema blandai.blandai_create_tool --json
ParameterTypeRequiredDescription
name string yes Tool name.
description string no Tool description.
url string yes External API URL.
method string yes HTTP method, usually GET or POST.
headers object no Optional request headers.
body object no Optional request body schema/defaults.
query object no Optional query schema/defaults.
blandai.blandai_get_current_user 0 parameters
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.