Skip to content

One command, every Layer model

Generate images, video, 3D, and audio with 300+ models without leaving your terminal. Sign in once, script the rest.

Read the docs

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

    Install

    uv tool install layer

    One self-contained tool, on any Python 3.10 or newer.

  2. 2

    Sign in

    layer login

    Opens a browser and stores the credential in your OS keychain. Use --device over SSH.

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

Prefer another installer? uv tool install layer · pipx install layer · pip install layer

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

Terminal

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.

Scripting

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.

Models

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.

Async

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.

Image

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.

Video

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.

3D

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.

Audio

Sound effects in a loop

for s in hit crit block; do layer generate audio -p "$s sfx, arcade" -o sfx/; done

The command is ordinary enough to sit inside a shell loop.

Scripting

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.

Where a setting comes from

Highest wins.

  1. 1A command-line flag — --profile, --workspace, --project, --api-url
  2. 2An environment variable — LAYER_PROFILE, LAYER_WORKSPACE, LAYER_PROJECT, LAYER_API_URL, LAYER_API_KEY
  3. 3layer.toml, found by walking up from the working directory
  4. 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?+
Run 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?+
The same catalogue as the Layer app — 300+ models across image, video, 3D, and audio. 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?+
That is what it is for. --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?+
Creative Units from your workspace balance, exactly as in the app. The estimate is printed before every run. --confirm asks first, and --max-cost 5 refuses anything more expensive. See pricing.
Do I have to wait for long video renders?+
No. --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?+
Into your working directory, named from the prompt, never overwriting a file that is already there — an asset costs Creative Units, so a matching name is numbered rather than replaced. -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?+
The CLI is for you and your scripts; the MCP server is for an agent acting on your behalf. They reach the same models, the same workspace, and the same Creative Unit balance — use whichever fits the job, or both.
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.