CLI

Official command-line interface for the VideoGen API.

The VideoGen CLI wraps @videogen/sdk and exposes every public API resource as videogen <resource> <kebab-command>. Commands print JSON to stdout.

Install

$npm install -g @videogen/cli

Or run once without installing:

$npx @videogen/cli --help

Authenticate

Interactive sign-in with Sign in with VideoGen (OAuth 2.1 + PKCE). Opens your browser and caches tokens locally:

$videogen login
$videogen logout

For scripts and CI, use an API key instead:

$export VIDEOGEN_API_KEY="sk_videogen_live_..."

Override per command with --api-key. Credential order: --api-keyVIDEOGEN_API_KEY → cached OAuth token from videogen login. Optional --base-url / VIDEOGEN_BASE_URL (default https://api.videogen.io). Point at DEV/PRERELEASE at runtime with --base-url (one binary for all environments). Optional VIDEOGEN_CLI_CONFIG_DIR overrides the token cache directory.

Quick start

$videogen login
$videogen account get-me
1{
2 "apiKeyId": "vg_key_...",
3 "apiKeyNickname": "CI",
4 "email": "[email protected]",
5 "displayName": "Ada",
6 "teamId": "vg_team_..."
7}
$videogen --help
$videogen tools --help

Run a workflow

Pass the request JSON with --body. Add --wait to poll until the run finishes:

$videogen workflows script-to-video --wait --body '{
> "script": "Stay hydrated for better focus and energy.",
> "visualStyle": {
> "type": "AI_IMAGE",
> "aiStyle": "loose watercolor illustration with visible brushstrokes"
> },
> "quality": "HIGH",
> "remixActions": [
> { "type": "ENABLE_CAPTIONS" },
> {
> "type": "CONVERT_IMAGES_TO_VIDEOS",
> "motionPrompt": "slow cinematic push-in",
> "muteOutputVideos": true,
> "quality": "HIGH"
> }
> ]
>}'

Run a tool

$videogen tools generate-image --wait --body '{
> "prompt": "A sunset over a calm ocean, cinematic lighting",
> "quality": "HIGH"
>}'

Upload a file

--type is a VideoGen file type (IMAGE, VIDEO, AUDIO, PDF, SLIDESHOW), not a MIME type:

$videogen files upload ./clip.mp4 --type VIDEO

Common flags

Flag / commandDescription
videogen loginInteractive OAuth sign-in (browser + PKCE).
videogen logoutClear cached OAuth credentials.
--api-key <key>API key (or VIDEOGEN_API_KEY).
--base-url <URL>Override the API base URL.
--body <JSON>Request body (--body @file.json, or pipe JSON on stdin).
--waitPoll until complete (tools / workflows / export / remix / assistant).
--json / --no-jsonForce JSON stdout (on by default). Not a body flag.
Path/query paramsKebab flags (e.g. --project-id, --workflow-run-id, --file-id).