activate
Options
TEXT
required
Name of the environment (e.g. production).
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
ID of the model.Mutually exclusive with other flags in group
model-ref.TEXT
Name of the model. Use —team to disambiguate when the same name exists in multiple teams.Mutually exclusive with other flags in group
model-ref.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. Only valid with —model-name.
BOOL
Enable verbose logging
Examples
Activate the deployment associated with an environmentFilter output with --jq
Print just the success flag
Output
Text mode (--output text): On success, prints “Activated environment name” to stderr; no stdout output.
JSON mode (--output json): payload type managementapi.ActivateResponse.
deactivate
--yes to skip the prompt. When stdin is not a terminal, --yes is required.
Options
TEXT
required
Name of the environment (e.g. production).
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
ID of the model.Mutually exclusive with other flags in group
model-ref.TEXT
Name of the model. Use —team to disambiguate when the same name exists in multiple teams.Mutually exclusive with other flags in group
model-ref.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. Only valid with —model-name.
BOOL
Skip the interactive confirmation prompt. Required when stdin is not a terminal.
BOOL
Enable verbose logging
Examples
Deactivate an environment without the confirmation promptFilter output with --jq
Print just the success flag
Output
Text mode (--output text): On success, prints “Deactivated environment name” to stderr; no stdout output.
JSON mode (--output json): payload type managementapi.DeactivateResponse.
describe
Options
TEXT
required
Name of the environment (e.g. production).
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
ID of the model.Mutually exclusive with other flags in group
model-ref.TEXT
Name of the model. Use —team to disambiguate when the same name exists in multiple teams.Mutually exclusive with other flags in group
model-ref.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. Only valid with —model-name.
BOOL
Enable verbose logging
Examples
Describe the production environment of a modelFilter output with --jq
Print the current deployment ID
Output
Text mode (--output text): Field-per-line summary: Name, Model, Current Deployment, Status, Candidate Deployment (optional), Created.
JSON mode (--output json): payload type managementapi.Environment.
list
Options
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
ID of the model.Mutually exclusive with other flags in group
model-ref.TEXT
Name of the model. Use —team to disambiguate when the same name exists in multiple teams.Mutually exclusive with other flags in group
model-ref.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. Only valid with —model-name.
BOOL
Enable verbose logging
Examples
List all environments of a modelFilter output with --jq
Print just the environment names
Output
Text mode (--output text): Table with columns: NAME, CURRENT DEPLOYMENT, STATUS. When no environments exist, prints “No environments found.” to stderr.
JSON mode (--output json): payload type managementapi.Environments.
logs
--limit lines from the last 30 minutes, newest first, and prints a note to stderr when --limit trims older lines. Use --start/--end or --since to scope the window (max 7 days). Use --tail to stream live logs until the environment’s current deployment leaves a runnable state or you interrupt with Ctrl-C.
For machine-readable streaming, prefer --output jsonl over --output json.
For request-ID tracing, scope, and log export, see Logs.
Options
TEXT
End of the log time range. Accepts ISO 8601; values without a timezone designator are interpreted in the local timezone. Default is now. Window must be at most 7 days.
TEXT
required
Name of the environment (e.g. production).
TEXT (repeatable)
Case-sensitive substring; lines containing it are dropped. May be repeated.
TEXT (repeatable)
Case-sensitive substring that must appear in the log message. May be repeated; all must match.
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
INTEGER
default:"5000"
Maximum number of log lines to return, paging backward from the end of the window. Use 0 for no limit (every log line in the window). Not applicable with —tail.
TEXT
Only return logs at or above this severity level.One of:
debug, info, warning, errorTEXT
ID of the model.Mutually exclusive with other flags in group
model-ref.TEXT
Name of the model. Use —team to disambiguate when the same name exists in multiple teams.Mutually exclusive with other flags in group
model-ref.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
Only return logs emitted by this replica (5-char short ID).
TEXT
Only return logs tagged with this inference request ID.
TEXT
RE2 regular expression matched against the log message. Prefer —includes and —excludes for plain substring matches.
TEXT
Shortcut for fetching logs from a relative time ago until now. Accepts a Go duration (e.g. ‘30m’, ‘1h30m’) or ‘
Nd’ (e.g. ‘3d’). Maximum ‘7d’. Mutually exclusive with —start and —end.TEXT
Start of the log time range. Accepts ISO 8601 (e.g. ‘2026-05-14’, ‘2026-05-14T12:00:00’, ‘2026-05-14T12:00:00Z’). Values without a timezone designator are interpreted in the local timezone. Default is 30 minutes before the end. Window must be at most 7 days.
BOOL
Stream new logs as they arrive until the deployment leaves a runnable state or you interrupt with Ctrl-C. Cannot be combined with the time-range or filter flags. For machine-readable streaming, prefer —output jsonl over —output json.
TEXT
Team name or ID. Only valid with —model-name.
BOOL
Enable verbose logging
Examples
Print logs for the production environment over the last hourFilter output with --jq
Stream just the log messages as a JSONL stream
Output
Text mode (--output text): One line per log record: “[YYYY-MM-DD HH:MM:SS]: (replica) message”.
JSON mode (--output json): payload type managementapi.Log.
metrics
--mode current for a snapshot, --mode summary to aggregate a window, or --mode series to plot values over time. Scope the window with --since or --start/--end (max 7 days; only applies to summary and series), and select metrics with one or more --metric flags. In series mode the window is split at each promotion so every point reflects the deployment(s) serving the environment at that time.
Options
TEXT
End of the metrics time range. Accepts ISO 8601; values without a timezone designator are interpreted in the local timezone. If omitted, the server defaults the end to now. Window must be at most 7 days.
TEXT
required
Name of the environment (e.g. production).
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT (repeatable)
Name of a metric to return; see https://docs.baseten.co/observability/export-metrics/supported-metrics for the available names. May be repeated. When omitted, a default set is returned.
TEXT
default:"current"
Aggregation mode. ‘current’ returns an instantaneous snapshot at now; ‘summary’ aggregates the whole window into one value per metric; ‘series’ returns evenly-spaced points across the window. —start/—end/—since are only meaningful for summary and series.One of:
current, summary, seriesTEXT
ID of the model.Mutually exclusive with other flags in group
model-ref.TEXT
Name of the model. Use —team to disambiguate when the same name exists in multiple teams.Mutually exclusive with other flags in group
model-ref.BOOL
For —mode series, emit a per-step table instead of sparklines.
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
Shortcut for a window from a relative time ago until now. Accepts a Go duration (e.g. ‘30m’, ‘1h30m’) or ‘
Nd’ (e.g. ‘3d’). Maximum ‘7d’. Mutually exclusive with —start and —end.TEXT
Start of the metrics time range. Accepts ISO 8601 (e.g. ‘2026-05-14’, ‘2026-05-14T12:00:00’, ‘2026-05-14T12:00:00Z’). Values without a timezone designator are interpreted in the local timezone. If omitted, the server defaults the start to one hour before the end. Window must be at most 7 days.
TEXT
Team name or ID. Only valid with —model-name.
BOOL
Enable verbose logging
Examples
Show a current snapshot of the default metrics for the production environmentFilter output with --jq
Print the metric names returned
Output
Text mode (--output text): For current and summary, a table with columns METRIC, one column per label dimension (for example QUANTILE, STAT), and VALUE; summary counter values show “total (rate/s)”. For series, a sparkline per metric label set with its min-max range and end value, or a per-step table under --no-chart.
JSON mode (--output json): payload type managementapi.GetModelMetricsResponse.
The metrics response: metric_descriptors, index-mapped metric_values, the resolved mode, and the returned window.