Get API key
API Playground
CLI
MCP Server
Base URL
https://api.heygen.com · Auth header X-Api-Key: <your-key> · What you’ll build: an MP4 from one text prompt.Your first video
Authenticate
Create a key in Settings → API and export it. See the API Key guide for OAuth and rotation.
Create a video
Send a prompt to the Video Agent — it scripts, picks the avatar and voice, and renders. Returns a
session_id. Full schema: POST /v3/video-agents.- curl
- Python
- Node.js
Response
Pick your endpoint
The Video Agent is the fastest path, but you can also drive each model directly.Video Agent
Prompt → finished video. The agent handles script, avatar, and scenes. Flagship.
Avatar V
Direct control: pick the avatar, voice, and script.
engine: { "type": "avatar_v" }.Cinematic Avatar
Prompt-driven cinematic shots from 1–3 avatar looks. No script or voice.
Video Translation
Translate any video into 30+ languages with voice cloning and lip-sync.
Text to Speech
Turn text into natural speech audio. Browse or design a voice.
HyperFrames
Render HTML/CSS/JS compositions into motion-graphics video. New.
Build with your stack
Webhooks
Get notified when renders finish — no polling.
Authentication
API keys, OAuth 2.0, and request signing.
CLI
Create and translate video from your terminal.
Limits & Pricing
Rate limits, usage, and per-operation cost.
Migrating from v1/v2? Those endpoints are supported until October 31, 2026, but all new capabilities ship on v3. See the version comparison.
Troubleshooting
Video status is failed
Video status is failed
Inspect
failure_code and failure_message on GET /v3/videos/{video_id}. The full catalog is in Error Codes.401 Unauthorized
401 Unauthorized
429 Too Many Requests
429 Too Many Requests
You’ve hit a rate or concurrency limit. Respect the
Retry-After header and back off exponentially. See Usage Limits.400 download_failed
400 download_failed
A URL you passed (video, image, audio) couldn’t be fetched. Make sure it’s publicly accessible and points directly at the file. See Error Codes.
All error codes
Machine-readable codes, HTTP statuses, and how to handle each one.

