Video Agent

Generate videos with a single prompt using the HeyGen Video Agent API. No web app required.

  • Endpoint: POST https://api.heygen.com/v1/video_agent/generate
  • Purpose: One-shot video generation from a text prompt (AI Video Agent).
  • Docs: Create with Video Agent

Authentication

Every request must include your API key in a header:

HeaderValue
X-API-KEYYour HeyGen API token

Getting an API key

  1. Sign in at HeyGen.
  2. Go to HeyGen → Settings → API token: app.heygen.com/settings → API.

Security: Do not expose the API key in client-side code. Use environment variables or a secrets manager.


Quick Example

curl -X POST "https://api.heygen.com/v1/video_agent/generate" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Your video description here"}'

Replace YOUR_API_KEY and adjust the JSON body to match the API reference (e.g. prompt, model, or other parameters).


Usage Tips

  1. Try in the docs: Use the “Try It” console on the Generate Video Agent page with your API key.
  2. Postman: Import the HeyGen Postman collection and use the Video Agent request template.
  3. Limits & credits: Usage depends on your plan (Free Trial, Pro, Scale, Enterprise). See API limits.

Links