Skip to navigation

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-key → VIDEOGEN_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
{
"apiKeyId": "vg_key_...",
"apiKeyNickname": "CI",
"email": "[email protected]",
"displayName": "Ada",
"teamId": "vg_team_..."
}
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, visible brushstrokes, soft color bleeds, paper texture, muted palette. A clear uncluttered subject centered in the frame, occupying only the middle half of the image, with generous empty margins on all four sides, no background clutter."
},
"quality": "HIGH",
"autoExport": true,
"remixActions": [
{ "type": "ENABLE_CAPTIONS" },
{
"type": "CONVERT_IMAGES_TO_VIDEOS",
"motionPrompt": "slow cinematic push-in",
"muteOutputVideos": true,
"quality": "HIGH"
}
]
}' | jq -r '.downloadUrl'

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).