KosmoKrator

ai

ElevenLabs CLI for AI Agents

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

8 functions 5 read 3 write API key auth

ElevenLabs CLI Setup

ElevenLabs can be configured headlessly with `kosmokrator integrations:configure elevenlabs`.

# 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 elevenlabs --set api_key="$ELEVENLABS_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor elevenlabs --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 ELEVENLABS_API_KEY Secret secret yes API Key

Call ElevenLabs Headlessly

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

kosmo integrations:call elevenlabs.elevenlabs_text_to_speech '{
  "voice_id": "example_voice_id",
  "text": "example_text",
  "model_id": "example_model_id",
  "stability": 1,
  "similarity_boost": 1,
  "style": 1,
  "use_speaker_boost": true
}' --json

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

kosmo integrations:elevenlabs elevenlabs_text_to_speech '{
  "voice_id": "example_voice_id",
  "text": "example_text",
  "model_id": "example_model_id",
  "stability": 1,
  "similarity_boost": 1,
  "style": 1,
  "use_speaker_boost": 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 elevenlabs --json
kosmo integrations:docs elevenlabs.elevenlabs_text_to_speech --json
kosmo integrations:schema elevenlabs.elevenlabs_text_to_speech --json
kosmo integrations:search "ElevenLabs" --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 ElevenLabs.

elevenlabs.elevenlabs_text_to_speech

Write write

Convert text to speech audio using an ElevenLabs voice. Returns base64-encoded audio. Choose a voice ID and model ID to control the output.

Parameters
voice_id, text, model_id, stability, similarity_boost, style, use_speaker_boost

Generic CLI call

kosmo integrations:call elevenlabs.elevenlabs_text_to_speech '{"voice_id":"example_voice_id","text":"example_text","model_id":"example_model_id","stability":1,"similarity_boost":1,"style":1,"use_speaker_boost":true}' --json

Provider shortcut

kosmo integrations:elevenlabs elevenlabs_text_to_speech '{"voice_id":"example_voice_id","text":"example_text","model_id":"example_model_id","stability":1,"similarity_boost":1,"style":1,"use_speaker_boost":true}' --json

elevenlabs.elevenlabs_list_voices

Read read

List all available voices in your ElevenLabs account, including pre-made and cloned voices. Use this to discover voice IDs for text-to-speech.

Parameters
none

Generic CLI call

kosmo integrations:call elevenlabs.elevenlabs_list_voices '{}' --json

Provider shortcut

kosmo integrations:elevenlabs elevenlabs_list_voices '{}' --json

elevenlabs.elevenlabs_get_voice

Read read

Get detailed information about a specific ElevenLabs voice, including its settings, labels, and fine-tuning info.

Parameters
voice_id

Generic CLI call

kosmo integrations:call elevenlabs.elevenlabs_get_voice '{"voice_id":"example_voice_id"}' --json

Provider shortcut

kosmo integrations:elevenlabs elevenlabs_get_voice '{"voice_id":"example_voice_id"}' --json

elevenlabs.elevenlabs_create_voice

Write write

Create a new voice clone in ElevenLabs. Provide a name, optional audio sample file paths or base64-encoded data, and an optional description.

Parameters
name, files, description

Generic CLI call

kosmo integrations:call elevenlabs.elevenlabs_create_voice '{"name":"example_name","files":"example_files","description":"example_description"}' --json

Provider shortcut

kosmo integrations:elevenlabs elevenlabs_create_voice '{"name":"example_name","files":"example_files","description":"example_description"}' --json

elevenlabs.elevenlabs_delete_voice

Write write

Permanently delete a voice from your ElevenLabs account. This action cannot be undone.

Parameters
voice_id

Generic CLI call

kosmo integrations:call elevenlabs.elevenlabs_delete_voice '{"voice_id":"example_voice_id"}' --json

Provider shortcut

kosmo integrations:elevenlabs elevenlabs_delete_voice '{"voice_id":"example_voice_id"}' --json

elevenlabs.elevenlabs_get_models

Read read

List all available ElevenLabs text-to-speech models, including their IDs, names, and language support. Use model IDs when calling text_to_speech.

Parameters
none

Generic CLI call

kosmo integrations:call elevenlabs.elevenlabs_get_models '{}' --json

Provider shortcut

kosmo integrations:elevenlabs elevenlabs_get_models '{}' --json

elevenlabs.elevenlabs_get_history

Read read

Browse your ElevenLabs generation history. Returns a paginated list of past text-to-speech requests with metadata.

Parameters
page_size, start_after

Generic CLI call

kosmo integrations:call elevenlabs.elevenlabs_get_history '{"page_size":1,"start_after":1}' --json

Provider shortcut

kosmo integrations:elevenlabs elevenlabs_get_history '{"page_size":1,"start_after":1}' --json

elevenlabs.elevenlabs_get_current_user

Read read

Get your ElevenLabs account details, including subscription tier, character usage, and remaining quota.

Parameters
none

Generic CLI call

kosmo integrations:call elevenlabs.elevenlabs_get_current_user '{}' --json

Provider shortcut

kosmo integrations:elevenlabs elevenlabs_get_current_user '{}' --json

Function Schemas

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

elevenlabs.elevenlabs_text_to_speech

Convert text to speech audio using an ElevenLabs voice. Returns base64-encoded audio. Choose a voice ID and model ID to control the output.

Operation
Write write
Schema command
kosmo integrations:schema elevenlabs.elevenlabs_text_to_speech --json
ParameterTypeRequiredDescription
voice_id string yes The voice identifier (use list_voices to discover available voices).
text string yes The text to convert to speech.
model_id string no Model ID to use (e.g., "eleven_multilingual_v2", "eleven_monolingual_v1", "eleven_turbo_v2_5"). Defaults to "eleven_multilingual_v2".
stability number no Voice stability (0.0–1.0). Higher values reduce randomness.
similarity_boost number no Voice similarity boost (0.0–1.0). Higher values enforce voice similarity.
style number no Style exaggeration (0.0–1.0). Higher values increase expressiveness.
use_speaker_boost boolean no Enable speaker boost for enhanced clarity.

elevenlabs.elevenlabs_list_voices

List all available voices in your ElevenLabs account, including pre-made and cloned voices. Use this to discover voice IDs for text-to-speech.

Operation
Read read
Schema command
kosmo integrations:schema elevenlabs.elevenlabs_list_voices --json
ParameterTypeRequiredDescription
No parameters.

elevenlabs.elevenlabs_get_voice

Get detailed information about a specific ElevenLabs voice, including its settings, labels, and fine-tuning info.

Operation
Read read
Schema command
kosmo integrations:schema elevenlabs.elevenlabs_get_voice --json
ParameterTypeRequiredDescription
voice_id string yes The voice identifier to look up.

elevenlabs.elevenlabs_create_voice

Create a new voice clone in ElevenLabs. Provide a name, optional audio sample file paths or base64-encoded data, and an optional description.

Operation
Write write
Schema command
kosmo integrations:schema elevenlabs.elevenlabs_create_voice --json
ParameterTypeRequiredDescription
name string yes Name for the new voice.
files array no Array of audio sample file paths or base64-encoded audio strings for voice cloning.
description string no Optional description of the voice (e.g., "Warm female narrator").

elevenlabs.elevenlabs_delete_voice

Permanently delete a voice from your ElevenLabs account. This action cannot be undone.

Operation
Write write
Schema command
kosmo integrations:schema elevenlabs.elevenlabs_delete_voice --json
ParameterTypeRequiredDescription
voice_id string yes The voice identifier to delete.

elevenlabs.elevenlabs_get_models

List all available ElevenLabs text-to-speech models, including their IDs, names, and language support. Use model IDs when calling text_to_speech.

Operation
Read read
Schema command
kosmo integrations:schema elevenlabs.elevenlabs_get_models --json
ParameterTypeRequiredDescription
No parameters.

elevenlabs.elevenlabs_get_history

Browse your ElevenLabs generation history. Returns a paginated list of past text-to-speech requests with metadata.

Operation
Read read
Schema command
kosmo integrations:schema elevenlabs.elevenlabs_get_history --json
ParameterTypeRequiredDescription
page_size integer no Number of history items per page (default: 20, max: 100).
start_after integer no History item ID to start after (for cursor-based pagination).

elevenlabs.elevenlabs_get_current_user

Get your ElevenLabs account details, including subscription tier, character usage, and remaining quota.

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