Which credential you need
Authenticate says which credential each endpoint takes.
Create a key
- Open the factory, then Settings → API keys.
- Choose Create API key.
- Enter a Name for what uses the key, such as
laptoporci. - Choose a preset. See Choose a preset.
- Choose Create.
- Copy the key. OuterLayer shows it only at this time.
Choose a preset
Each preset is a fixed set of permissions. With Custom, you select each permission.
Four presets. Agent is the default and suits the CLI on a developer machine.

The Runner preset lists the permissions it carries.
- A member with the Write role can create Agent and Reader keys. Only the Owner and Admin roles can create a Runner key, because it includes
work.update. - An Agent key cannot run
work stop, orwork removeon another member’s addition. Those needwork.update. - An Agent key cannot use the cost and trend tools of the MCP server. Those need
metrics.read. - A key keeps the permissions it had when you created it. To change them, choose Edit API key on the key’s row.
work.read or context.read, the dialog also selects git.read.

Custom shows every permission, grouped by area.
Permissions that CLI commands need
work remove also needs work.read when you name the issue and not the item number.
work comment needs work.comment, work.insert, evidence.insert, work.review or work.approve. The one it needs depends on what the comment records. A key holds no work.review and no work.approve. See work comment.
If spec file or spec edit is refused, edit the key and add spec.insert or spec.update.
The same permissions apply to a member in the dashboard:
- Remove from Work needs
work.insertfor your own addition. It needswork.updatefor an item with a build in progress, an open pull request or another member’s addition. - To start a draft spec and approve it, a member needs
spec.insert. - To edit a draft’s spec text, change mocks or approve a spec again, a member needs
spec.update. - File issue on a problem needs
spec.insert. - Open PR on a problem needs
work.insertandspec.insert. - To close or reopen a problem, or to close an item’s pull requests, a member needs
work.update.
Give the key to the CLI
Pipe the key toouterlayer login:
--app-id takes the Factory ID, from the factory’s Settings → General.
The CLI reads the key from stdin, never from a flag, and never prints it. To keep the key out of your shell history, read it into the variable first. In bash or zsh, run read -rs OUTERLAYER_KEY, then paste the key.
The dialog that shows a new key also shows this command with the key and the factory ID filled in.
login saves the key in ~/.outerlayer/config.json. Only your user can read the file.
To sign in without a key, run outerlayer login with nothing piped and approve it in the dashboard. Then run outerlayer connect to choose a factory. The machine then holds a login for your account. When a machine has both, the CLI uses the factory key. See Cloud commands.
Use a key in CI
Set three environment variables. Do not runlogin:
Rotate or revoke
- Open Settings → API keys.
- Choose Delete API key on the key’s row, then Delete.
- Create a new key.
- Run
loginagain on each machine that used the old key.
Runner keys
A runner needs a key with the Runner preset. A runner key binds to the host key of the first machine that claims with it. OuterLayer then refuses the key from any other machine. Settings → API keys shows the host key fingerprint of each bound key. To move the key to a new machine, choose Clear host key. See Give the runner its key and Moving a runner to a new host. The audit log records each bind, each clear and each request that OuterLayer refused for its signature.A personal runner key
You can get a runner key of your own without the dialog. Runouterlayer runner init in your terminal. It opens a page that names the factory and the machine. Choose Approve. The runner gets the key by itself, and you copy nothing.
This key is a personal runner key. It belongs to you, and its runner builds only the work you ask for. It holds no more than you hold on the factory, and it stops working when you leave the organization. See Personal and shared runners.
To approve, your role must let you create factory API keys, as it must for Create API key. See Roles and permissions. Without that permission, the page refuses and makes no key.
Next steps
- Make a request with your key.
- Errors says what a refusal means.