vidgena CLI

Generate, track, and download images and videos from your terminal. The CLI uses the same API key and credits as your Console.

Install and sign in

Use Node.js 24 or later on Windows, macOS, or Linux. Once the npm package is published, install it with the command below. If you have a release archive, install it with npm install -g ./vidgena-cli-0.1.0.tgz.

shell
npm install -g @vidgena/cli
vidgena --version
vidgena auth login
vidgena auth status

Paste a Key from Console into the hidden prompt. The CLI verifies it with the API and saves it in your system credential store. vidgena auth logout clears the local entry. In PowerShell, use npm.cmd and vidgena.cmd if script execution is restricted.

Generate and download

shell
vidgena models list --human
vidgena credits get --human

Check a video quote first. Submit with a credit limit, then copy the returned task_id into the download command.

shell
vidgena video create --prompt "A slow tracking shot through a forest at dawn" --duration 10 --resolution 768P --ratio 16:9 --quote-only
vidgena video create --prompt "A slow tracking shot through a forest at dawn" --duration 10 --resolution 768P --ratio 16:9 --max-credits 10 --wait --timeout 20m
vidgena video download "<task_id>" --output-path ./forest.mp4

For images, use the image commands. Omit --wait to return as soon as the server accepts a task. Use get --wait to resume polling an existing task.

shell
vidgena image create --prompt "An illustrated mountain town at sunrise" --max-credits 3
vidgena image get "<task_id>" --wait
vidgena image download "<task_id>" --output-path ./town.png

Downloads fetch a fresh link. If you omit --output-path, the CLI uses the task ID with a .png or .mp4 extension in your working directory.

Regenerate in 2K

Use the task ID of a successful video with task.content.refinable set to true. Prices are based on the source task’s duration. Download the new task using its returned ID.

shell
vidgena video regenerate "<source_task_id>" --quote-only
vidgena video regenerate "<source_task_id>" --wait
vidgena video download "<new_task_id>" --output-path ./forest-2k.mp4

Request bodies

Use --request-schema to inspect the bundled request schema offline. Use --body-file to pass an entire JSON request. For simple calls, use command options such as --reference-image, --first-frame, and --last-frame with publicly accessible HTTPS URLs.

shell
vidgena video create --request-schema
vidgena video create --body-file ./request.json --quote-only
vidgena video create --help

Automation

Inject VIDGENA_API_KEY from your CI secret store. It takes precedence over your saved Key. The default API is https://api.vidgena.com. Use --api-url or VIDGENA_API_URL to target your own environment.

Successful commands return JSON on stdout. Progress and errors use stderr. Use --human for readable output.

Supply a unique --idempotency-key for each intended generation and reuse it with the same request when retrying. If polling times out, keep the returned task ID and use get --wait to continue.

Exit codeMeaning
0Command succeeded
1API, generation, download, or network error
2Invalid command or options
3Authentication or credential-store error
4Polling timed out. The task can still complete.