One command, every Layer model
Generate images, video, 3D, and audio with 300+ models without leaving your terminal. Sign in once, script the rest.
Also on pipx and pip. Python 3.10 and up, so it installs beside Blender, Maya, and Houdini.
From nothing to a file, in three
No API key to mint, no config to write. The first generation picks its own model and tells you which it chose.
- 1
Install
uv tool install layerOne self-contained tool, on any Python 3.10 or newer.
- 2
Sign in
layer loginOpens a browser and stores the credential in your OS keychain. Use --device over SSH.
- 3
Generate
layer generate image -p "a cyberpunk market stall, isometric"Picks the recommended model, prices the run, waits for it, and writes the file to your working directory.
uv tool install layer · pipx install layer · pip install layerBuilt to be called by a script
The same models, workspaces, and Creative Unit balance as the app — reachable from a Makefile, a CI job, or a pipeline step.
Stay where the work already is
Generate art, video, 3D, and audio from the same shell as your build. No tab to switch to, no browser step in the middle of a pipeline.
Output a script can actually read
--json puts the result on stdout and nothing else: progress, warnings, and errors all go to stderr. Eight documented exit codes let a caller tell an empty balance from a rejected prompt.
The live catalogue, not a baked-in list
layer base-models list shows what your workspace can run right now, and show prints exactly what a model accepts — so a --param typo fails before it costs anything.
Block when you want to, not because you must
Runs wait by default and print what they cost. Pass --no-wait to get an id back immediately and collect the result later with layer generate status.
Commands to start with
Paste one into a terminal you have signed in from. Each prints what it will cost before it spends anything.
A batch of icons
layer generate image -n 4 -p "crystal sword icon, transparent background"Four variations in one run, written to the working directory.
Key art into a clip
layer generate video -d 5 --aspect-ratio 16:9 -p "camera pushes through the gate"Duration and shape are flags; the model is chosen for you unless you name one.
A prop to drop into engine
layer generate mesh -p "weathered treasure chest, game-ready" -o props/Writes the mesh into props/ without ever overwriting a file that is already there.
Sound effects in a loop
for s in hit crit block; do layer generate audio -p "$s sfx, arcade" -o sfx/; doneThe command is ordinary enough to sit inside a shell loop.
Fire and forget
id=$(layer --json generate video --no-wait -p "..." | jq -r .inference_id)Submit now, collect later with layer generate status $id --wait.
The whole surface
Four groups of commands. Everything else is a flag on one of them.
Sign in
layer login, logout, whoami, and use — browser sign-in, a device code for headless machines, or LAYER_API_KEY for CI.
Generate
layer generate image, video, mesh, and audio, plus generate status for a run you submitted with --no-wait.
Models
layer base-models list and show — what your workspace can run, and exactly what each model accepts.
Configuration
Named profiles, a committed layer.toml that pins a checkout to its workspace, and the environment variables that override both.
Where a setting comes from
Highest wins.
- 1A command-line flag — --profile, --workspace, --project, --api-url
- 2An environment variable — LAYER_PROFILE, LAYER_WORKSPACE, LAYER_PROJECT, LAYER_API_URL, LAYER_API_KEY
- 3layer.toml, found by walking up from the working directory
- 4The active profile in ~/.layer/config.toml
Exit codes
Part of the published contract: they may gain members, never change meaning.
- 0
- The run finished.
- 1
- Anything without a more specific code.
- 2
- Unknown flag, missing argument, or a bad value.
- 3
- Not signed in, expired, or the token lacks access.
- 4
- The workspace cannot pay for the run.
- 5
- The API rejected the request as invalid.
- 6
- Refused by the content policy.
- 7
- The run did not finish inside the time allowed.
Written for production, not for a demo
The details that decide whether a tool survives contact with a live-service content pipeline.
Priced before it runs
Every generation prints its Creative Unit estimate before spending anything. --confirm turns that into a prompt; --max-cost turns it into a hard refusal.
Installs on Python 3.10 and up
Deliberately older than the services that build it, so the same package imports inside Blender, Maya, and Houdini — where a studio's pipeline code already lives.
A checkout cannot generate into the wrong workspace
Commit a layer.toml and it pins that directory to its workspace and project. Two repos open in two terminals stay apart, with no flag to remember.
Built for unattended runs
Set LAYER_API_KEY to a personal access token and the CLI never asks for a browser or reads a stored session. Add --quiet and a build log gets the result and nothing else.
CLI questions
How do I install it?+
uv tool install layer, or pipx install layer. It is published to PyPI as layer and runs on Python 3.10 or newer, so it also installs alongside Blender, Maya, and Houdini.How does it authenticate?+
layer login and sign in through your browser; the credential is stored in your operating system keychain. On a machine with no browser, layer login --device shows a code to enter elsewhere. For CI, set LAYER_API_KEY to a personal access token and skip signing in entirely.Which models can I run?+
layer base-models list reads it live from your workspace, and layer base-models show prints what one accepts. If you do not name a model, the CLI picks the recommended one and tells you which it chose. Browse the catalogue.Can I use it in a script or a CI job?+
--json puts the result on stdout and moves everything else to stderr, so a pipeline never has to filter output. Failures exit with a documented code — 3 for auth, 4 for an empty balance, 6 for a content-policy refusal — so a caller can branch without parsing prose.What does a generation cost?+
--confirm asks first, and --max-cost 5 refuses anything more expensive. See pricing.Do I have to wait for long video renders?+
--no-wait submits the run and prints its id immediately; layer generate status <id> reads it back, and --wait on that blocks until it finishes. Without the flag, a run waits and shows progress.Where do generated files go?+
-o takes a directory, or the exact filename when there is a single output, and --no-download prints URLs instead.How is this different from the MCP server?+
Is there a Python library too?+
The package is importable, but its API is not stable yet — today the supported surface is the command. Pin a version if you script against anything below it.
Want your agent to drive Layer instead? Connect the MCP server or install the Agent Skills. The package itself is on PyPI.
Generate from the terminal
Install it, sign in, and make your first asset in under a minute.