KosmoKrator

data

AssemblyAI CLI for AI Agents

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

AssemblyAI CLI Setup

AssemblyAI can be configured headlessly with `kosmokrator integrations:configure assemblyai`.

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 assemblyai --set api_key="$ASSEMBLYAI_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor assemblyai --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 ASSEMBLYAI_API_KEY Secret secret yes API Key
url ASSEMBLYAI_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 assemblyai.assemblyai_transcribe '{"audio_url":"example_audio_url","language_code":"example_language_code","speaker_labels":true,"auto_chapters":true,"entity_detection":true,"sentiment_analysis":true,"summarization":true,"punctuate":true}' --json
Provider shortcut
kosmo integrations:assemblyai assemblyai_transcribe '{"audio_url":"example_audio_url","language_code":"example_language_code","speaker_labels":true,"auto_chapters":true,"entity_detection":true,"sentiment_analysis":true,"summarization":true,"punctuate":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 assemblyai --json
kosmo integrations:docs assemblyai.assemblyai_transcribe --json
kosmo integrations:schema assemblyai.assemblyai_transcribe --json
kosmo integrations:search "AssemblyAI" --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.

assemblyai.assemblyai_transcribe

Submit an audio or video file URL for AI transcription. Supports speech-to-text, speaker diarization, summarization, sentiment analysis, and more. Returns a transcript ID to poll for results.

Write write
Parameters
audio_url, language_code, speaker_labels, auto_chapters, entity_detection, sentiment_analysis, summarization, punctuate, format_text, webhook_url, custom_topics, topics
Generic call
kosmo integrations:call assemblyai.assemblyai_transcribe '{"audio_url":"example_audio_url","language_code":"example_language_code","speaker_labels":true,"auto_chapters":true,"entity_detection":true,"sentiment_analysis":true,"summarization":true,"punctuate":true}' --json
Shortcut
kosmo integrations:assemblyai assemblyai_transcribe '{"audio_url":"example_audio_url","language_code":"example_language_code","speaker_labels":true,"auto_chapters":true,"entity_detection":true,"sentiment_analysis":true,"summarization":true,"punctuate":true}' --json

assemblyai.assemblyai_get_transcript

Retrieve a transcript by ID. Returns the transcription text, status (queued, processing, completed, error), confidence score, and any enabled AI features like speaker labels, chapters, or sentiment analysis.

Read read
Parameters
id
Generic call
kosmo integrations:call assemblyai.assemblyai_get_transcript '{"id":"example_id"}' --json
Shortcut
kosmo integrations:assemblyai assemblyai_get_transcript '{"id":"example_id"}' --json

assemblyai.assemblyai_delete_transcript

Delete an AssemblyAI transcript and remove associated uploaded file data from AssemblyAI systems.

Write write
Parameters
id
Generic call
kosmo integrations:call assemblyai.assemblyai_delete_transcript '{"id":"example_id"}' --json
Shortcut
kosmo integrations:assemblyai assemblyai_delete_transcript '{"id":"example_id"}' --json

assemblyai.assemblyai_get_paragraphs

Get a completed transcript split into semantic paragraphs with timestamps and words.

Read read
Parameters
id
Generic call
kosmo integrations:call assemblyai.assemblyai_get_paragraphs '{"id":"example_id"}' --json
Shortcut
kosmo integrations:assemblyai assemblyai_get_paragraphs '{"id":"example_id"}' --json

assemblyai.assemblyai_get_sentences

Get a completed transcript split into semantic sentences with timestamps and words.

Read read
Parameters
id
Generic call
kosmo integrations:call assemblyai.assemblyai_get_sentences '{"id":"example_id"}' --json
Shortcut
kosmo integrations:assemblyai assemblyai_get_sentences '{"id":"example_id"}' --json

assemblyai.assemblyai_get_subtitles

Export a completed transcript as SRT or VTT subtitle text.

Read read
Parameters
id, format, chars_per_caption
Generic call
kosmo integrations:call assemblyai.assemblyai_get_subtitles '{"id":"example_id","format":"example_format","chars_per_caption":1}' --json
Shortcut
kosmo integrations:assemblyai assemblyai_get_subtitles '{"id":"example_id","format":"example_format","chars_per_caption":1}' --json

assemblyai.assemblyai_get_redacted_audio

Get redacted audio for a transcript created with redact_pii_audio enabled.

Read read
Parameters
id
Generic call
kosmo integrations:call assemblyai.assemblyai_get_redacted_audio '{"id":"example_id"}' --json
Shortcut
kosmo integrations:assemblyai assemblyai_get_redacted_audio '{"id":"example_id"}' --json

assemblyai.assemblyai_list_transcripts

List transcripts with pagination. Returns transcript IDs, statuses, and metadata.

Read read
Parameters
limit, before_id, after_id
Generic call
kosmo integrations:call assemblyai.assemblyai_list_transcripts '{"limit":1,"before_id":"example_before_id","after_id":"example_after_id"}' --json
Shortcut
kosmo integrations:assemblyai assemblyai_list_transcripts '{"limit":1,"before_id":"example_before_id","after_id":"example_after_id"}' --json

assemblyai.assemblyai_upload

Upload a local audio or video file to AssemblyAI. Returns an upload URL that can be passed to the transcribe tool as the audio_url parameter. Supports most common audio and video formats.

Write write
Parameters
file_path
Generic call
kosmo integrations:call assemblyai.assemblyai_upload '{"file_path":"example_file_path"}' --json
Shortcut
kosmo integrations:assemblyai assemblyai_upload '{"file_path":"example_file_path"}' --json

assemblyai.assemblyai_create_streaming_token

Generate a temporary token for browser or client-side Streaming Speech-to-Text sessions.

Read read
Parameters
expires_in_seconds, max_session_duration_seconds
Generic call
kosmo integrations:call assemblyai.assemblyai_create_streaming_token '{"expires_in_seconds":1,"max_session_duration_seconds":1}' --json
Shortcut
kosmo integrations:assemblyai assemblyai_create_streaming_token '{"expires_in_seconds":1,"max_session_duration_seconds":1}' --json

assemblyai.assemblyai_llm_gateway_chat

Create a chat completion through AssemblyAI LLM Gateway using a prompt or message list.

Read read
Parameters
model, messages, prompt, max_tokens, temperature, tools, tool_choice, response_format, fallbacks, fallback_config
Generic call
kosmo integrations:call assemblyai.assemblyai_llm_gateway_chat '{"model":"example_model","messages":"example_messages","prompt":"example_prompt","max_tokens":1,"temperature":1,"tools":"example_tools","tool_choice":"example_tool_choice","response_format":"example_response_format"}' --json
Shortcut
kosmo integrations:assemblyai assemblyai_llm_gateway_chat '{"model":"example_model","messages":"example_messages","prompt":"example_prompt","max_tokens":1,"temperature":1,"tools":"example_tools","tool_choice":"example_tool_choice","response_format":"example_response_format"}' --json

Function Schemas

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

assemblyai.assemblyai_transcribe 12 parameters
Schema command
kosmo integrations:schema assemblyai.assemblyai_transcribe --json
ParameterTypeRequiredDescription
audio_url string yes URL of the audio or video file to transcribe. Can also be an AssemblyAI upload URL from the upload tool.
language_code string no Language code (e.g., "en_us", "es", "fr"). Defaults to auto-detection if omitted.
speaker_labels boolean no Enable speaker diarization to identify who spoke and when.
auto_chapters boolean no Automatically break the transcript into chapters.
entity_detection boolean no Detect entities like dates, locations, and organizations in the transcript.
sentiment_analysis boolean no Analyze sentiment (positive, negative, neutral) for each sentence.
summarization boolean no Generate a summary of the transcript.
punctuate boolean no Add punctuation to the transcript.
format_text boolean no Format text with capitalization and paragraph breaks.
webhook_url string no URL to receive a webhook when the transcript is complete.
custom_topics array no List of custom topics to detect in the audio.
topics array no Enable topic detection with AssemblyAI's built-in topics.
assemblyai.assemblyai_get_transcript 1 parameters
Schema command
kosmo integrations:schema assemblyai.assemblyai_get_transcript --json
ParameterTypeRequiredDescription
id string yes The transcript ID returned by the transcribe tool.
assemblyai.assemblyai_delete_transcript 1 parameters
Schema command
kosmo integrations:schema assemblyai.assemblyai_delete_transcript --json
ParameterTypeRequiredDescription
id string yes Transcript ID.
assemblyai.assemblyai_get_paragraphs 1 parameters
Schema command
kosmo integrations:schema assemblyai.assemblyai_get_paragraphs --json
ParameterTypeRequiredDescription
id string yes Transcript ID.
assemblyai.assemblyai_get_sentences 1 parameters
Schema command
kosmo integrations:schema assemblyai.assemblyai_get_sentences --json
ParameterTypeRequiredDescription
id string yes Transcript ID.
assemblyai.assemblyai_get_subtitles 3 parameters
Schema command
kosmo integrations:schema assemblyai.assemblyai_get_subtitles --json
ParameterTypeRequiredDescription
id string yes Transcript ID.
format string no Subtitle format: srt or vtt. Defaults to srt.
chars_per_caption integer no Maximum characters per caption.
assemblyai.assemblyai_get_redacted_audio 1 parameters
Schema command
kosmo integrations:schema assemblyai.assemblyai_get_redacted_audio --json
ParameterTypeRequiredDescription
id string yes Transcript ID.
assemblyai.assemblyai_list_transcripts 3 parameters
Schema command
kosmo integrations:schema assemblyai.assemblyai_list_transcripts --json
ParameterTypeRequiredDescription
limit integer no Maximum number of transcripts to return per page (default: 20, max: 200).
before_id string no Return transcripts created before this transcript ID (for pagination).
after_id string no Return transcripts created after this transcript ID (for pagination).
assemblyai.assemblyai_upload 1 parameters
Schema command
kosmo integrations:schema assemblyai.assemblyai_upload --json
ParameterTypeRequiredDescription
file_path string yes Absolute path to the local audio or video file to upload (e.g., "/tmp/recording.mp3").
assemblyai.assemblyai_create_streaming_token 2 parameters
Schema command
kosmo integrations:schema assemblyai.assemblyai_create_streaming_token --json
ParameterTypeRequiredDescription
expires_in_seconds integer yes Token lifetime from 1 to 600 seconds.
max_session_duration_seconds integer no Maximum streaming session duration from 60 to 10800 seconds.
assemblyai.assemblyai_llm_gateway_chat 10 parameters
Schema command
kosmo integrations:schema assemblyai.assemblyai_llm_gateway_chat --json
ParameterTypeRequiredDescription
model string yes LLM Gateway model id.
messages array no Conversation messages. Either messages or prompt is required.
prompt string no Simple single-turn prompt. Either prompt or messages is required.
max_tokens integer no Maximum output tokens. Defaults to 1000 upstream.
temperature number no Sampling temperature.
tools array no Optional tool/function definitions.
tool_choice object no Optional tool choice control.
response_format object no Optional structured output format.
fallbacks array no Optional fallback model configs.
fallback_config object no Optional fallback behavior config.

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.