Skip to content

Commit 54f2002

Browse files
somanshreddyclaude
andcommitted
docs: add SKILL.md for agent discovery
Progressive disclosure file for AI agents. Follows Anthropic Agent Skills best practices and awesome-agent-clis format. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4637bc8 commit 54f2002

1 file changed

Lines changed: 99 additions & 0 deletions

File tree

SKILL.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
name: heygen-cli
3+
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."
4+
---
5+
6+
# HeyGen CLI
7+
8+
Official CLI for the HeyGen video generation API. 30+ commands auto-generated from the OpenAPI spec. All output is JSON by default.
9+
10+
- **API Docs**: https://developers.heygen.com
11+
- **Install**: `curl -fsSL https://heygen-cli.heygen.com/install.sh | bash`
12+
- **Auth**: Requires `HEYGEN_API_KEY` environment variable. The key must be provisioned by a user from https://app.heygen.com/settings/api
13+
14+
## Key Commands
15+
16+
```bash
17+
# Create video from prompt (simplest path — blocks until done)
18+
heygen video-agent create --prompt "Make a 30-second product demo" --wait
19+
20+
# Create avatar video with full control
21+
heygen video create -d '{"video_inputs":[{"character":{"type":"avatar","avatar_id":"josh_lite"},"voice":{"type":"text","voice_id":"en_male","input_text":"Hello world"}}]}'
22+
23+
# Check video status
24+
heygen video get <video-id>
25+
26+
# Download completed video
27+
heygen video download <video-id>
28+
29+
# List resources
30+
heygen video list --limit 5
31+
heygen video list --all
32+
heygen avatar list --limit 10
33+
heygen voice list
34+
35+
# Translate a video
36+
heygen video-translate create -d '{"video":{"type":"url","url":"https://..."},"output_languages":["es"]}'
37+
```
38+
39+
## Async Operations
40+
41+
Video creation is asynchronous. Two patterns:
42+
43+
**Block until done (recommended):**
44+
```bash
45+
heygen video-agent create --prompt "Demo video" --wait --timeout 5m
46+
# stdout: final resource JSON with video_url when complete
47+
```
48+
49+
**Manual polling:**
50+
```bash
51+
heygen video create -d '{"...}' # stdout: JSON with video_id
52+
heygen video get <video-id> # stdout: JSON with status field
53+
heygen video download <video-id> # downloads file, stdout: JSON with path
54+
```
55+
56+
## Request Bodies
57+
58+
Create/update commands accept JSON via `-d`/`--data`:
59+
- Inline: `-d '{"key": "value"}'`
60+
- From file: `-d request.json`
61+
- From stdin: `echo '{"...}' | heygen video create -d -`
62+
63+
Flags override matching fields in the JSON when both are provided.
64+
65+
To discover the expected JSON fields, use `--request-schema`:
66+
```bash
67+
heygen video create --request-schema # shows all request body fields with types and descriptions
68+
heygen video-agent create --request-schema
69+
```
70+
71+
To see what the API returns, use `--response-schema`:
72+
```bash
73+
heygen video get --response-schema # shows all response fields
74+
```
75+
76+
Both output valid JSON Schema. Available on all create/update commands (`--request-schema`) and all commands (`--response-schema`). No auth required.
77+
78+
## Output Contract
79+
80+
- **stdout**: JSON (always). Parseable by `jq`. This is the only output agents should consume.
81+
- **stderr**: JSON error envelope on failure: `{"error":{"code":"...","message":"...","hint":"..."}}`
82+
- **Pagination**: `--all` fetches all pages into a flat JSON array.
83+
- Do not pass `--human`. It produces unstructured text that cannot be parsed.
84+
85+
## Exit Codes
86+
87+
| Code | Meaning |
88+
|------|---------|
89+
| 0 | Success |
90+
| 1 | General error (API error, network failure) |
91+
| 2 | Usage error (invalid flags, missing arguments) |
92+
| 3 | Authentication error |
93+
94+
## Notes
95+
96+
- `--wait` handles polling with exponential backoff (2s to 30s). Default timeout is 10 minutes.
97+
- The CLI retries transient errors (429, 5xx) automatically.
98+
- Video download writes to `{video-id}.mp4` by default. Override with `--output-path`.
99+
- For the full API reference (concepts, limits, pricing), see https://developers.heygen.com

0 commit comments

Comments
 (0)