ai
HeyGen CLI for Coding Agents
Use the HeyGen CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write Bearer token auth
HeyGen CLI for Coding Agents
Let coding agents discover schemas and execute integration functions through CLI commands or MCP.
Use this pattern when another coding agent needs exact commands and schema discovery. The HeyGen CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# HeyGen CLI for Coding Agents
kosmokrator integrations:configure heygen --set access_token="$HEYGEN_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call heygen.heygen_list_videos '{"limit":1,"offset":1}' --json Discovery Before Execution
Agents and scripts can inspect HeyGen docs and schemas before choosing a function.
kosmo integrations:docs heygen --json
kosmo integrations:docs heygen.heygen_list_videos --json
kosmo integrations:schema heygen.heygen_list_videos --json
kosmo integrations:search "HeyGen" --json
kosmo integrations:list --json Useful HeyGen CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
heygen.heygen_list_videos | Read | limit, offset | List generated videos from HeyGen. Returns video IDs, statuses, and metadata. Use limit and offset for pagination. |
heygen.heygen_get_video | Read | video_id | Get the status and details of a specific HeyGen video. Returns the video status (pending, processing, completed, failed), download URL when ready, and metadata. |
heygen.heygen_create_video | Write | video_inputs, dimension, test | Generate a new AI video on HeyGen. Provide video_inputs defining scenes (avatar, voice, script), optional dimensions, and test mode. Returns a video_id to track generation progress. |
heygen.heygen_list_avatars | Read | none | List all available talking avatars from HeyGen. Returns avatar IDs, names, preview images, and supported styles. Use avatar IDs when creating videos. |
heygen.heygen_list_voices | Read | none | List all available voices from HeyGen. Returns voice IDs, display names, supported languages, gender, and preview audio URLs. Use voice IDs when creating videos. |
heygen.heygen_get_current_user | Read | none | Get the current authenticated HeyGen user's account information, including plan details, remaining credits, and usage statistics. |
heygen.heygen_list_templates | Read | limit, offset | List available video templates from HeyGen. Returns template IDs, names, thumbnails, and metadata. Use limit and offset for pagination. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.