Skip to main content
The snapgen command reads models, input schemas and prices from the live SnapGen catalog, turns each model’s input fields into flags, submits jobs and waits for the results. Browsing the catalog needs no API key.
Requires Node.js 20 or newer.

Three steps from discovery to result

1

Find and inspect a model

describe lists every flag with its type, default and allowed values, plus the execution mode and the current price.
2

Save your API key

Create a key on the API keys page, then:
The key is stored in the macOS Keychain, the Linux Secret Service keyring (secret-tool), or otherwise in ~/.config/snapgen/config.json, readable only by you. SNAPGEN_API_KEY takes precedence when set.
3

Run the model

This is a paid request. Check the price with describe first; failed generations are not charged.

Commands

Flags come from the live schema

Each field of a model’s input schema becomes a flag: aspect_ratio is --aspect-ratio, booleans are --generate-audio / --no-generate-audio, and list fields repeat the flag, take commas, or take JSON. Integers, enums and list sizes are checked against the schema, and fields you leave out get the schema default. Unknown flags and invalid values stop the command with exit code 2 before anything paid is sent. snapgen run <model> --help lists a model’s flags, and --dry-run prints the exact request without sending it.

Long jobs

Use submit for video and other long jobs, keep the task id, and continue from any terminal or CI step:
When --timeout runs out the task keeps running: snapgen prints the task id and the task wait command to resume, and exits with code 4. Submissions send an Idempotency-Key, so repeating a failed submit with the same key returns the original task instead of starting a second one.

Output for scripts

--format table|json|jsonl|csv. The default is a table on a terminal and JSON when the output is piped. --output FILE writes the result to a file. Progress and hints go to stderr.

Environment