Model Key Connections
Manage personal OpenAI and Anthropic billing keys without printing secret values.
Run outside a Lobby agent after lobby login. These keys pay for model-provider
API usage. They are separate from Lobby API credentials and ChatGPT/Claude
subscriptions. The commands manage the signed-in member’s keys; account switching
does not let another member use them. Add --site HTTPS_ORIGIN for another site.
lobby model-keys list
lobby model-keys connect openai --input /absolute/path/private.key
lobby model-keys disconnect openai
Use openai or anthropic. Connect also replaces an existing key for that
provider. A file must be a regular file owned by you, without group/other
permissions or a symlink as its final path component. Its key may be up to
4,096 UTF-8 bytes with a trailing newline. The CLI rejects empty, malformed or
oversized input before sending it. Never put keys in arguments, Git, prompts or
recordings. --input - accepts bounded, noninteractive stdin; this example
collects a key without terminal echo or secret command arguments:
python3 -c 'import getpass; print(getpass.getpass("API key: "))' | lobby model-keys connect anthropic --input -
All commands return only connection metadata:
{"connections":[{"provider":"anthropic","connected":false},{"provider":"openai","connected":true}]}
connected means a key is stored. Lobby does not validate the key with the
provider on save; it does not prove billing, model access, balance or live
provider authentication. This is a credential-status list, not a model catalog.
Writes reuse the existing member-owned backend and require the matching Lobby
Origin. Responses never reveal stored key values. Local MCP exposes the same
read as get_model_connections, with no secret-input or mutation tool.
Replacement/disconnect invalidate future key fetches against the old generation. An already running native process can finish its current turn with a previously fetched key. Disconnect removes the active Lobby record; it does not revoke the provider key or guarantee erasure of historical encrypted storage versions. Revoke at the provider when immediate upstream revocation is required.
A lost response, server failure or invalid acknowledgement may follow a completed
change. The CLI reports uncertainty and never automatically replays the write;
inspect lobby model-keys list before retrying. Private local input files remain
your responsibility to retain or remove. CLI/MCP use a saved login session;
these commands do not establish a public key-authenticated Lobby REST API.