list
Options
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
BOOL
Enable verbose logging
Examples
List all API keys in the orgFilter output with --jq
Print just the prefixes of personal keys
Output
Text mode (--output text): Table with columns: NAME, KEY (prefix + ****), TYPE, TEAM. When no keys exist, prints “No API keys found.” to stderr.
JSON mode (--output json): payload type managementapi.APIKeys.
create
--model-id may be repeated to scope the key to specific models and is only valid with --type workspace-export-metrics or --type workspace-invoke.
Options
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT (repeatable)
Restrict the key to a specific model. May be repeated. Only valid with —type workspace-export-metrics or workspace-invoke.
TEXT
Optional human-readable name for the key.
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID to create the key in. Defaults to the organization’s default team. Run ‘baseten org team list’ to see teams.
TEXT
required
API key category.One of:
personal, workspace-export-metrics, workspace-invoke, workspace-manage-all, workspace-manage-api-keysBOOL
Enable verbose logging
Examples
Create a personal API keyFilter output with --jq
Print just the raw key value
Output
Text mode (--output text): Prints the raw API key value on stdout (one line). Also prints “Save this key now. It will not be shown again.” to stderr.
JSON mode (--output json): payload type managementapi.APIKey.
delete
--name or --prefix is required: --name matches the human-readable name, --prefix matches the leading characters shown in org api-key list.
Options
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
Human-readable name of the API key to delete.Mutually exclusive with other flags in group
identifier.TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
Prefix of the API key to delete (as shown in list).Mutually exclusive with other flags in group
identifier.TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
BOOL
Enable verbose logging
Examples
Delete an API key by nameFilter output with --jq
Print just the deleted key’s prefix
Output
Text mode (--output text): Prints “Deleted API key prefix” to stderr on success; no stdout output.
JSON mode (--output json): payload type managementapi.APIKeyTombstone.