Authentication

Every request to the VideoGen API must include your API key.

API keys

The VideoGen API uses Bearer token authentication. Include your API key in the Authorization header of every request:

$Authorization: Bearer YOUR_API_KEY

Creating a key

  1. Go to app.videogen.io/developers
  2. Click Create API key
  3. Copy the key immediately; it is only displayed once

Keeping your key safe

Your API key is a secret. Do not expose it in client-side code (browsers, mobile apps) or commit it to version control. Use environment variables or a secrets manager instead.

$export VIDEOGEN_API_KEY="vg_key_..."

Making requests

1import { VideoGenClient } from "@videogen/sdk";
2
3const client = new VideoGenClient({
4 token: process.env.VIDEOGEN_API_KEY,
5});

Error responses

If your key is missing or invalid, the API returns 401 Unauthorized:

1{
2 "message": "Unauthorized"
3}