Sign in
Signing in is the same OAuth step as creating an account — new users land on the sign-up screen.Sign in
The default flow opens your browser for OAuth and captures the token on a loopback port:For CI or headless machines, save a long-lived API key instead:
~/.heygen/credentials (mode 0600) — no per-repo .env to manage. Browser OAuth is a hyperframes auth login feature. The separate heygen CLI (its own install — there’s no npx heygen) is API-key-only, so heygen auth login just stores a key you paste. Both read the same ~/.heygen/credentials, so signing in with one carries to the other.
How credentials resolve
The HeyGen credential drives TTS and music / SFX retrieval. It resolves first-match-wins:HEYGEN_API_KEY— environment variableHYPERFRAMES_API_KEY— alias, for parity with other tools~/.heygen/credentials— written byhyperframes auth login(orheygen auth login)
HEYGEN_CONFIG_DIR, or a different backend with HEYGEN_API_URL.
Keys by capability
Each capability picks the first available provider in order; the last is always a local engine that needs no key. Cloud providers below the HeyGen line need their own key and a local Python dependency.| Capability | Provider order | Key(s) — first match wins | Local dependency |
|---|---|---|---|
| Voice (TTS) | HeyGen → ElevenLabs → Kokoro | HEYGEN_API_KEY → HYPERFRAMES_API_KEY → ~/.heygen · then ELEVENLABS_API_KEY | Kokoro: pip install kokoro-onnx soundfile |
| Music (BGM) | HeyGen library → Lyria → MusicGen | HeyGen credential (above) · then GEMINI_API_KEY → GOOGLE_API_KEY | MusicGen: pip install transformers torch soundfile numpy |
| Sound effects | HeyGen library → bundled library | HeyGen credential (above) | bundled — no deps |
| Capture descriptions | OpenRouter → Gemini | OPENROUTER_API_KEY → GEMINI_API_KEY | — (optional; for website-to-video) |
npx hyperframes doctor to check which local dependencies are installed. The media skills also run hyperframes auth status as a preflight before generating, so you always know whether a run will use HeyGen or a local engine before it starts.
Working offline
No key configured is a normal state, not an error. The workflow runs entirely on local models:- Voice — Kokoro-82M (54 voices), with Whisper for word-level caption alignment.
- Music — MusicGen (
facebook/musicgen-small). - Sound effects — a bundled library.
Environment variables
| Variable | Used for |
|---|---|
HEYGEN_API_KEY | HeyGen credential — voice + music/SFX retrieval. Highest priority. |
HYPERFRAMES_API_KEY | Alias for HEYGEN_API_KEY. |
HEYGEN_API_URL | API base URL (default https://api.heygen.com). |
HEYGEN_CONFIG_DIR | Credentials directory (default ~/.heygen). |
ELEVENLABS_API_KEY | ElevenLabs TTS, used when no HeyGen credential is present. |
GEMINI_API_KEY / GOOGLE_API_KEY | Lyria music generation (and capture descriptions). |
OPENROUTER_API_KEY | Capture descriptions; takes priority over Gemini for that step. |
hyperframes auth command reference for subcommand details, and Cloud rendering for using the same credential to render in HeyGen’s cloud.