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 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 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.
update-autoscaling
baseten model environment describe to see the current values.
Options
INTEGER
Timeframe of traffic considered for autoscaling decisions, in seconds.
INTEGER
Number of requests per replica before scaling up.
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)
INTEGER
Maximum number of replicas.
INTEGER
Maximum percentage of replicas that can be removed per autoscaling window (1-50). For example, 20 means at most 20% of replicas are removed per window.
INTEGER
Minimum number of replicas.
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
INTEGER
Waiting period before scaling down any active replica, in seconds.
INTEGER
Target number of in-flight tokens for autoscaling decisions. Early access only.
INTEGER
Target utilization percentage for scaling up and down.
TEXT
Team name or ID. Only valid with —model-name.
BOOL
Enable verbose logging
Examples
Raise the production environment’s replica boundsFilter output with --jq
Print the environment’s resulting minimum replica count
Output
Text mode (--output text): On success, prints “Updated autoscaling settings for environment name” to stderr; no stdout output.
JSON mode (--output json): payload type managementapi.UpdateEnvironmentResponse.
update-promotion
baseten model environment describe to see the current values.
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)
INTEGER
The maximum surge percentage for rolling deploys.
The maximum unavailable percentage for rolling deploys.
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
The cleanup strategy to use after a promotion completes.One of:
keep, scale-to-zero, deactivateINTEGER
Duration of the ramp up, in seconds.
BOOL
Whether to ramp up traffic while promoting. Pass
true or false explicitly; omit the flag to leave this setting unchanged.BOOL
Whether to deploy on all promotions. Enabling this allows model code to safely handle environment-specific logic: when a deployment is promoted, a new deployment is created with a copy of the image. Pass
true or false explicitly; omit the flag to leave this setting unchanged.INTEGER
The replica overhead percentage for rolling deploys.
BOOL
Whether the environment should rely on rolling deploy orchestration. Pass
true or false explicitly; omit the flag to leave this setting unchanged.TEXT
The rolling deploy strategy to use for promotions.One of:
replicaINTEGER
The stabilization time for rolling deploys, in seconds.
TEXT
Team name or ID. Only valid with —model-name.
BOOL
Enable verbose logging
Examples
Turn on rolling deploys and scale the outgoing deployment to zeroFilter output with --jq
Print the resulting cleanup strategy
Output
Text mode (--output text): On success, prints “Updated promotion settings for environment name” to stderr; no stdout output.
JSON mode (--output json): payload type managementapi.UpdateEnvironmentResponse.
update-request-backpressure
--policy null to clear an existing policy and fall back to the default.
Run baseten model environment describe to see the current values.
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
required
Backpressure policy to apply. Pass null to clear an existing policy.One of:
queue-on-full, reject-on-fullTEXT
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
Reject requests once the queue is fullFilter output with --jq
Print the resulting policy
Output
Text mode (--output text): The resulting policy, or “none” when no policy is set.
JSON mode (--output json): payload type managementapi.UpdateEnvironmentResponse.