Code Pluginsource linked

HeyGen Video Agentv0.1.0

HeyGen Video Agent provider plugin for OpenClaw — first-class avatar/presenter video generation via OpenClaw's video_generate tool.

openclaw-plugin-heygen·runtime heygen·by @kenchung
Community code plugin. Review compatibility and verification before install.
openclaw plugins install clawhub:openclaw-plugin-heygen
Latest release: v0.1.0Download zip

Compatibility

Built With Open Claw Version
2026.4.22
Min Gateway Version
2026.3.24-beta.2
Plugin Api Range
>=2026.3.24-beta.2
Plugin Sdk Version
2026.4.22
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
The package name, README, SKILL.md, openclaw.plugin.json and TypeScript provider implement a HeyGen Video Agent provider that talks to api.heygen.com. The declared capabilities (avatar_id, voice_id, orientation, webhook callbacks, file attachments) line up with the code in video-generation-provider.ts. No unrelated credentials or unrelated binaries are requested by the plugin code or docs.
Instruction Scope
Runtime instructions in SKILL.md restrict activity to creating HeyGen sessions, polling for status, forwarding attachments (images), and optionally calling a caller-supplied callback_url. The instructions do not tell the agent to read unrelated files, access unrelated environment variables, or exfiltrate data to third-party endpoints outside HeyGen or caller-supplied webhooks. Webhook support is explicitly caller-provided, which is expected behavior.
Install Mechanism
No explicit install spec is provided (instruction-only install), but the repo contains TypeScript source and a package-lock.json. package.json has only devDependencies and a peerDependency on openclaw; however the lockfile lists many transitive packages (AWS SDK pieces, etc.). That is not intrinsically malicious, but if the OpenClaw gateway or integrator runs npm install to build/install the plugin, many transitive packages could be pulled in. The code itself doesn't download arbitrary archives or reference unusual hosts; network calls target api.heygen.com (expected).
Credentials
The plugin requires a single provider credential (HEYGEN_API_KEY) which is proportionate to its purpose. However there is an inconsistency in the provided metadata: the SKILL.md front matter and openclaw.plugin.json declare HEYGEN_API_KEY and primaryEnv: HEYGEN_API_KEY, but the top-level 'Requirements' section shown to the evaluator listed 'Required env vars: none'. This is a metadata mismatch to resolve before install so users know the plugin requires an API key.
Persistence & Privilege
The plugin does not set always: true and does not request system-wide privileges or to modify other plugins. It registers a videoGenerationProvider and will be available for agent invocation (normal for plugins). Autonomous invocation is enabled by default on the platform and is expected for provider plugins.
Assessment
This plugin appears to be what it claims: a HeyGen video-provider for OpenClaw that only needs your HeyGen API key. Before installing: (1) confirm the HEYGEN_API_KEY requirement (SKILL.md and openclaw.plugin.json declare it; update your gateway credentials or use the CLI onboarding as documented), (2) be aware that if the gateway builds the plugin it may run npm install and pull transitive dependencies from the lockfile — review/verify the build process and origin of any packages you don't recognize, (3) webhook callback_url is caller-specified — ensure your webhook endpoints validate incoming requests and do not leak sensitive data, (4) rotate the API key if you later uninstall the plugin or suspect misuse, and (5) resolve the small metadata inconsistency (registry metadata showing no required env vs SKILL.md/openclaw.plugin.json requiring HEYGEN_API_KEY) so the install UX clearly informs users of the credential requirement.

Verification

Tier
source linked
Scope
artifact only
Summary
Validated package structure and linked the release to source metadata.
Commit
5fca5dc4515e
Tag
main
Provenance
No
Scan status
clean

Tags

avatar
0.1.0
heygen
0.1.0
latest
0.1.0
openclaw
0.1.0
plugin
0.1.0
video
0.1.0

openclaw-plugin-heygen

ClawHub License: MIT

Adds HeyGen as a first-class provider for OpenClaw's built-in video_generate tool. Every agent that already uses video_generate (Google Veo, Runway, Kling, Wan, MiniMax, etc.) can now generate identity-preserving avatar videos through the same interface.

This is the official HeyGen plugin, maintained by HeyGen. It is published as an external OpenClaw plugin per the OpenClaw VISION.md guidance ("If you build a plugin, host and maintain it in your own repository").

What this plugin does

Unlike cinematic video providers (Veo, Runway, Kling) that excel at open-ended scene generation, HeyGen is built for identity-first avatar videos: a specific avatar, a specific voice, scripted narration, and full control over orientation and style. This plugin wires the HeyGen v3 Video Agent surface into OpenClaw so agents can:

  • Drop an avatar_id / voice_id / style_id and get a consistent on-brand presenter.
  • Pass scene context via file attachments (images) to ground the narration.
  • Generate landscape or portrait videos for any channel.
  • Receive async completion via webhook (callback_url + callback_id) or poll to completion.

When to use HeyGen vs other video providers

Pick HeyGen when the video needs a recognizable human presenter: explainer videos, internal training, sales enablement, localized announcements, talking-head content. Pick Veo / Runway / Kling when the video needs imagined scenes without a fixed identity: cinematic b-roll, scene generation, non-presenter content.

Install

openclaw plugins install openclaw-plugin-heygen

Restart the gateway after installing:

openclaw gateway restart

Authenticate

Set your HeyGen API key via either:

  • Environment variable: HEYGEN_API_KEY=hg_...
  • CLI: openclaw onboard --auth-choice heygen-api-key

Get a key from the HeyGen API settings page.

Make it the default video provider

openclaw config set agents.defaults.videoGenerationModel.primary "heygen/video_agent_v3"

Set a default avatar / voice (optional)

Skip the per-request avatar_id / voice_id when you always use the same presenter:

openclaw config set plugins.entries.heygen.config.defaultAvatarId "1e8adb28118944a3a7a8042656f275ed"
openclaw config set plugins.entries.heygen.config.defaultVoiceId  "JB4iKi8Nm2bJl2rrG8ht"
openclaw config set plugins.entries.heygen.config.defaultStyleId  "style_corporate_brief"

Per-request providerOptions.avatar_id / voice_id / style_id override the config defaults when set. If neither is set, the field is omitted and HeyGen falls back to the workspace default presenter (or errors).

Need an avatar id? The companion heygen-skills skill on ClawHub uploads a photo, creates a HeyGen avatar via the Avatar V pipeline, and captures the avatar_id + voice_id pair. Paste into the config block above.

Usage

await video_generate({
  model: "heygen/video_agent_v3",
  prompt: "Welcome new agents to HeyGen. Explain the v3 Video Agent API in under 45 seconds.",
  aspectRatio: "16:9",
  providerOptions: {
    avatar_id: "avatar_demo_123",
    voice_id: "voice_demo_456",
    style_id: "style_corporate_brief",
    callback_url: "https://my.app/webhooks/heygen",
    callback_id: "onboarding-welcome-001",
  },
});

Capabilities

  • Modes: generate, imageToVideo (reference image attached as scene context)
  • Aspect ratios: 16:9 (landscape), 9:16 (portrait). 1:1 is not supported. HeyGen Video Agent orientation enum is landscape | portrait only.
  • Max duration: 300 seconds (5 minutes). This is a plugin-side cap, not an API cap. HeyGen will accept longer prompts; bump MAX_DURATION_SECONDS in video-generation-provider.ts if you need longer renders.
  • Reference files: up to 20 input images forwarded as HeyGen file attachments

Avatar and voice discovery

Use GET /v3/avatars to list available avatar groups and looks, and GET /v3/voices for voices. The HeyGen CLI is a convenient alternative:

heygen avatar list
heygen voice list
heygen voice create --prompt "warm confident male narrator" --gender male

The heygen voice create --prompt command returns up to 3 designed voices matching a natural language description.

Provider options

HeyGen-specific options passed via providerOptions:

KeyTypeDescription
avatar_idstringHeyGen avatar look id (from GET /v3/avatars).
voice_idstringHeyGen voice id (from GET /v3/voices).
style_idstringOptional curated visual style template id.
orientationenumlandscape or portrait. Derived from aspectRatio if omitted.
callback_urlstringWebhook URL for async completion notifications.
callback_idstringCaller-defined correlation id echoed back in the webhook payload.
incognito_modebooleanOpt out of server-side logging.

API reference

  • Create session: POST https://api.heygen.com/v3/video-agents
  • Session poll (when video_id is null on create): GET https://api.heygen.com/v3/video-agents/{session_id}
  • Video poll: GET https://api.heygen.com/v3/videos/{video_id}
  • Auth header: X-Api-Key

See the HeyGen Video Agent API docs for full parameter coverage and the bundled docs/heygen.md for additional setup notes.

Testing

npm install
npm test

The unit tests in video-generation-provider.test.ts cover request shaping, polling, attachment forwarding, and error surfacing.

Note: plugin-registration.contract.test.ts is the OpenClaw plugin-registration contract test. It depends on harnesses from the OpenClaw monorepo (test/helpers/plugins/plugin-registration-contract.js) and runs as part of OpenClaw's CI when this plugin is loaded — it is intentionally not runnable standalone in this repo.

Support

License

MIT — see LICENSE.