| name | heygen-cli |
| description | Create AI videos, manage avatars, translate videos, and download results via the HeyGen API. Use when an agent needs to generate videos from text prompts, create avatar-based videos, translate existing videos, or automate video production workflows. |
HeyGen CLI
Official CLI for the HeyGen video generation API. 30+ commands auto-generated from the OpenAPI spec. All output is JSON by default.
Key Commands
heygen video-agent create --prompt "Make a 30-second product demo" --wait
heygen video create -d '{"type":"avatar","avatar_id":"josh_lite","script":"Hello world","voice_id":"en_male"}'
heygen video get <video-id>
heygen video download <video-id>
heygen update
heygen video list --limit 5
heygen avatar list --limit 10
heygen voice list
heygen video-translate create -d '{"video":{"type":"url","url":"https://..."},"output_languages":["es"]}'
Async Workflow
Video creation is asynchronous. Two patterns:
Block until done (recommended):
heygen video-agent create --prompt "Demo video" --wait
Manual polling:
heygen video create -d '{"...}'
heygen video get <video-id>
heygen video download <video-id>
Discovering API Fields
Use --request-schema and --response-schema on any command to see the full JSON Schema. No auth required.
heygen video create --request-schema
heygen video-agent create --request-schema
heygen video get --response-schema
Output Contract
- stdout: JSON (always). This is the only output agents should consume.
- stderr: JSON error envelope on failure:
{"error":{"code":"...","message":"...","hint":"..."}}
- Do not pass
--human. It produces unstructured text that cannot be parsed.
Notes
- The CLI retries transient errors (429, 5xx) automatically.
- Use
heygen update to check for and install a newer CLI release.
- Video download writes to
{video-id}.mp4 by default. Override with --output-path. Errors if the file already exists; use --force to overwrite.
- For the full API reference (concepts, limits, pricing), see https://developers.heygen.com