KosmoKrator

ai

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.

6 functions 4 read 2 write API key auth

AssemblyAI CLI Setup

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

# 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 use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key ASSEMBLYAI_API_KEY Secret secret yes API Key
url ASSEMBLYAI_URL URL url no API Base URL

Call AssemblyAI Headlessly

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

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

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

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

Agent Discovery Commands

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

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

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 AssemblyAI.

assemblyai.assemblyai_transcribe

Write write

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.

Parameters
audio_url, language_code, speaker_labels, auto_chapters, entity_detection, sentiment_analysis, summarization, punctuate, format_text, webhook_url, custom_topics, topics

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

assemblyai.assemblyai_get_transcript

Read read

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.

Parameters
id

Generic CLI call

kosmo integrations:call assemblyai.assemblyai_get_transcript '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:assemblyai assemblyai_get_transcript '{"id":"example_id"}' --json

assemblyai.assemblyai_list_transcripts

Read read

List transcripts with optional filtering by status, date range, and pagination. Returns transcript IDs, statuses, and metadata.

Parameters
limit, status, created_on, before_id, after_id, throttled_only

Generic CLI call

kosmo integrations:call assemblyai.assemblyai_list_transcripts '{"limit":1,"status":"example_status","created_on":"example_created_on","before_id":"example_before_id","after_id":"example_after_id","throttled_only":true}' --json

Provider shortcut

kosmo integrations:assemblyai assemblyai_list_transcripts '{"limit":1,"status":"example_status","created_on":"example_created_on","before_id":"example_before_id","after_id":"example_after_id","throttled_only":true}' --json

assemblyai.assemblyai_upload

Write write

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.

Parameters
file_path

Generic CLI call

kosmo integrations:call assemblyai.assemblyai_upload '{"file_path":"example_file_path"}' --json

Provider shortcut

kosmo integrations:assemblyai assemblyai_upload '{"file_path":"example_file_path"}' --json

assemblyai.assemblyai_get_lemons

Read read

Retrieve lemons (billing credits and usage information) from your AssemblyAI account.

Parameters
none

Generic CLI call

kosmo integrations:call assemblyai.assemblyai_get_lemons '{}' --json

Provider shortcut

kosmo integrations:assemblyai assemblyai_get_lemons '{}' --json

assemblyai.assemblyai_get_current_user

Read read

Get the authenticated user's profile, including email, subscription plan, and API usage details.

Parameters
none

Generic CLI call

kosmo integrations:call assemblyai.assemblyai_get_current_user '{}' --json

Provider shortcut

kosmo integrations:assemblyai assemblyai_get_current_user '{}' --json

Function Schemas

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

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.

Operation
Write write
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

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.

Operation
Read read
Schema command
kosmo integrations:schema assemblyai.assemblyai_get_transcript --json
ParameterTypeRequiredDescription
id string yes The transcript ID returned by the transcribe tool.

assemblyai.assemblyai_list_transcripts

List transcripts with optional filtering by status, date range, and pagination. Returns transcript IDs, statuses, and metadata.

Operation
Read read
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).
status string no Filter by status: "queued", "processing", "completed", or "error".
created_on string no Filter by creation date. Accepts a date string or operator (e.g., "gte:2025-01-01").
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).
throttled_only boolean no Only return throttled transcripts.

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.

Operation
Write write
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_get_lemons

Retrieve lemons (billing credits and usage information) from your AssemblyAI account.

Operation
Read read
Schema command
kosmo integrations:schema assemblyai.assemblyai_get_lemons --json
ParameterTypeRequiredDescription
No parameters.

assemblyai.assemblyai_get_current_user

Get the authenticated user's profile, including email, subscription plan, and API usage details.

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