Skip to content

monid keys

Manage API keys stored locally on your machine.

Commands


keys add

Add an API key to your local credential store.

Usage

bash
monid keys add --label <name> --key <key> [--json]

Flags

FlagTypeRequiredDescription
-l, --label <label>stringYesA unique label for the key
-k, --key <key>stringYesThe API key
-j, --jsonbooleanNoOutput raw JSON

Examples

bash
# Add a production key
monid keys add --label production --key monid_live_a1b2c3d4e5f6...

# Add a test key
monid keys add --label staging --key monid_test_x9y8z7w6v5u4...

Behavior

  • Label must be unique across stored keys
  • The first key you add is automatically set as the active key

keys list

List all stored API keys.

Usage

bash
monid keys list [--json]

Output

Label        Key                  Added               Active
production   monid_live_a1b2****  2026-01-15 10:00    *
staging      monid_test_x9y8****  2026-01-20 14:30

The active key (marked with *) is used for all API calls.


keys activate

Switch the active API key.

Usage

bash
monid keys activate --label <name>

Flags

FlagTypeRequiredDescription
-l, --label <label>stringYesLabel of the key to activate

Examples

bash
monid keys activate --label staging

keys remove

Remove an API key from your local credential store.

Usage

bash
monid keys remove --label <name> [--force] [--json]

Flags

FlagTypeRequiredDescription
-l, --label <label>stringYesLabel of the key to remove
--forcebooleanNoSkip confirmation prompt
-j, --jsonbooleanNoOutput raw JSON

Behavior

  • If the removed key was the active key, it's deactivated
  • This only removes the key locally -- it does not revoke the key on the server

TIP

To revoke a key on the server (so it can no longer be used for API calls), use the Monid web app.

Next Steps

The data layer for AI agents.