Skip to main content

layer

Command-line interface for Layer — AI asset generation for game studios.

Reaches the same models, workspaces, and Creative Unit balance as the app, from a terminal, a Makefile, or a CI job.

Install

uv tool install layer        # or: pipx install layer

Python 3.10 and up — deliberately older than the services that build it, so the same package imports inside Blender, Maya, and Houdini.

Working on the CLI itself? Install it from your checkout instead, so the layer command follows the branch you have out:

task -d apps/cli-py install-cli

Sign in

layer login                 # opens a browser
layer login --device        # for SSH sessions and containers
layer whoami
layer use my-studio

For CI and other unattended runs, set LAYER_API_KEY to a personal access token instead of signing in.

Generate

layer generate image -p "a crystal sword icon, transparent background"
layer generate video -d 5 --aspect-ratio 16:9 -p "camera pushes through the gate"
layer generate mesh  -p "weathered treasure chest, game-ready"
layer generate audio -p "arcade coin pickup"

Each waits for the run, prints what it cost, and writes the result into the working directory under a name derived from the prompt — never overwriting a file already there. -o takes a directory, or the exact filename when there is a single output; --no-download prints URLs instead.

Leave --base-model off and the recommended model for that modality is chosen and named. The catalogue is read from your workspace, not shipped with the package:

layer base-models list --modality video
layer base-models show bfl-flux-2-pro      # the keys --param accepts

Every run is priced before it executes. --confirm asks first; --max-cost 8 refuses anything more expensive. For a long render, submit and collect later:

id=$(layer --json generate video --no-wait -p "..." | jq -r .inference_id)
layer generate status "$id" --wait

Where settings come from

Highest wins:

  1. a command-line flag
  2. an environment variable — LAYER_PROFILE, LAYER_WORKSPACE, LAYER_PROJECT, LAYER_API_URL, LAYER_API_KEY
  3. layer.toml, found by walking up from the working directory
  4. the active profile in ~/.layer/config.toml

Committing a layer.toml pins a checkout to its workspace, so two repos open in two terminals cannot generate into each other's:

workspace = "my-studio"
project   = "season-12-art"

Scripting

--json puts the result on stdout and nothing else — progress, warnings, and errors all go to stderr, so a pipeline never has to filter them out.

layer --json whoami | jq -r .workspace
layer --json generate image -p "..." | jq -r '.files[].path'

Exit codes: 0 ok, 1 error, 2 usage, 3 auth, 4 insufficient balance, 5 invalid input, 6 content policy, 7 timeout. They may gain members, never change meaning, so a caller can branch on them without parsing prose.

Documentation

https://layer.ai/docs/cli

Driving Layer from an agent rather than a shell? There is an MCP server and an Agent Skills pack.

Licence

Apache-2.0

Release files for layer 1.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for layer 1.0.9
File Size Uploaded
layer-1.0.9.tar.gz 54.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for layer 1.0.9
File Interpreter ABI Platform
layer-1.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 119.5 kB

Release files / layer-1.0.9.tar.gz

Download URL layer-1.0.9.tar.gz
Size 54.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2a86c939449fde1e0b698ee987cc8abe470d60f11c7a4f75311b567d19c659f9
BLAKE2b-256 checksum
How to use checksums
f2de27fe3f072f7a99497d14afb465de2f5aad0132d9c289b2a45071bcb692b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / layer-1.0.9-py3-none-any.whl

Download URL layer-1.0.9-py3-none-any.whl
Size 65.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3a1237ecf2bc839a4ee1f38f788c13cffae435e46045a2ecbea1fc13ae43eef
BLAKE2b-256 checksum
How to use checksums
627d3a3db6eab4e0198bd3d5decb521e7edb540578f29f716224cdf4d8cfd4f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

1.0.21

2 release files

1.0.10

2 release files

This release

1.0.9 This release

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page