Skip to main content

activate

Activate a model deployment.

Options

TEXT
ID of the deployment.Mutually exclusive with other flags in group deployment-ref.
TEXT
Name of the deployment.Mutually exclusive with other flags in group deployment-ref.
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, none
TEXT
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 a deployment

Filter output with --jq

Print just the success flag

Output

Text mode (--output text): On success, prints “Activated deployment id” to stderr; no stdout output. JSON mode (--output json): payload type managementapi.ActivateResponse.

config

Fetch the config of a deployed model. By default prints the original config.yaml. Use --output json to emit the full response {config, raw_config} as JSON.

Options

TEXT
ID of the deployment.Mutually exclusive with other flags in group deployment-ref.
TEXT
Name of the deployment.Mutually exclusive with other flags in group deployment-ref.
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, none
TEXT
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

Print the deployment’s config.yaml

Filter output with --jq

Extract the parsed model_name field

Output

Text mode (--output text): The original config.yaml text (preserving comments and ordering) when available, otherwise the parsed config marshaled as YAML. JSON mode (--output json): payload type managementapi.DeploymentConfigResponse. The full {config, raw_config} envelope. raw_config is the original config.yaml text; config is the parsed shape.

deactivate

Deactivate a model deployment. Prompts for yes/no confirmation. Pass --yes to skip the prompt. When stdin is not a terminal, --yes is required.

Options

TEXT
ID of the deployment.Mutually exclusive with other flags in group deployment-ref.
TEXT
Name of the deployment.Mutually exclusive with other flags in group deployment-ref.
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, none
TEXT
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 a deployment without the confirmation prompt

Filter output with --jq

Print just the success flag

Output

Text mode (--output text): On success, prints “Deactivated deployment id” to stderr; no stdout output. JSON mode (--output json): payload type managementapi.DeactivateResponse.

download

Download the model source for a model deployment as an uncompressed tar. Exactly one of --out-file or --out-dir is required. --out-file writes the raw tar bytes; --out-dir extracts the tar into the directory. Use --overwrite to replace an existing file or write into a non-empty directory.

Options

TEXT
ID of the deployment.Mutually exclusive with other flags in group deployment-ref.
TEXT
Name of the deployment.Mutually exclusive with other flags in group deployment-ref.
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
Extract the model source tar into this directory.Mutually exclusive with other flags in group download-out.
TEXT
Save the model source as an uncompressed tar file at this path.Mutually exclusive with other flags in group download-out.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
BOOL
Allow overwriting an existing file or non-empty directory.
TEXT
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

Save the model source as a tar file
Extract the model source into a directory

Filter output with --jq

Print just the destination path

Output

Text mode (--output text): Writes the model source to disk; prints progress and the final destination path to stderr; no stdout output. JSON mode (--output json): payload type cmd.ModelDeploymentDownloadResult. On success, stdout is a JSON object with either out_file or out_dir set to the path written.

promote

Promote a model deployment to an environment. Defaults to the production environment. Cleanup of the previous deployment is controlled by the target environment’s promotion cleanup strategy. Prompts for yes/no confirmation. Pass --yes to skip the prompt. When stdin is not a terminal, --yes is required.

Options

TEXT
ID of the deployment.Mutually exclusive with other flags in group deployment-ref.
TEXT
Name of the deployment.Mutually exclusive with other flags in group deployment-ref.
TEXT
default:"production"
Target environment name. Defaults to 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, none
BOOL
Use this deployment’s instance type instead of preserving the target environment’s.
TEXT
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

Promote a deployment to production without the confirmation prompt
Promote to a non-production environment using the deployment’s own instance type

Filter output with --jq

Print the promoted deployment’s status

Output

Text mode (--output text): On success, prints “Promoted deployment id to environment env” to stderr; no stdout output. JSON mode (--output json): payload type managementapi.Deployment. Under --output json, the promoted deployment object.

delete

Delete a single model deployment. Deployments associated with an environment (e.g. production, development) and the only deployment of a model cannot be deleted server-side. Prompts for yes/no confirmation. Pass --yes to skip the prompt. When stdin is not a terminal, --yes is required.

Options

TEXT
ID of the deployment.Mutually exclusive with other flags in group deployment-ref.
TEXT
Name of the deployment.Mutually exclusive with other flags in group deployment-ref.
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, none
TEXT
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

Delete a deployment without the confirmation prompt

Filter output with --jq

Print the deleted deployment’s ID

Output

Text mode (--output text): On success, prints “Deleted deployment id” to stderr; no stdout output. JSON mode (--output json): payload type managementapi.DeploymentTombstone.

describe

Describe a model deployment by ID.

Options

TEXT
ID of the deployment.Mutually exclusive with other flags in group deployment-ref.
TEXT
Name of the deployment.Mutually exclusive with other flags in group deployment-ref.
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, none
TEXT
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 a deployment by ID

Filter output with --jq

Print just the deployment status

Output

Text mode (--output text): Field-per-line summary: ID, Name, Model, Environment (optional), Status, Instance (optional), Replicas, Created. JSON mode (--output json): payload type managementapi.Deployment.

list

List all deployments of a model.

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, none
TEXT
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 deployments of a model

Filter output with --jq

Print just the deployment IDs

Output

Text mode (--output text): Table with columns: ID, NAME, ENVIRONMENT, STATUS, INSTANCE, REPLICAS, CREATED. When no deployments exist, prints “No deployments found.” to stderr. JSON mode (--output json): payload type managementapi.Deployments.

logs

Fetch logs for a model deployment. By default returns up to --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 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
ID of the deployment.Mutually exclusive with other flags in group deployment-ref.
TEXT
Name of the deployment.Mutually exclusive with other flags in group deployment-ref.
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 (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, error
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, none
TEXT
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 a deployment over the last hour
Print logs for a fixed time range
Tail live logs until the deployment leaves a runnable state
Filter to warnings and above that contain a term

Filter 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

Fetch metrics for a model deployment. Use --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.

Options

TEXT
ID of the deployment.Mutually exclusive with other flags in group deployment-ref.
TEXT
Name of the deployment.Mutually exclusive with other flags in group deployment-ref.
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
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, series
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.
BOOL
For —mode series, emit a per-step table instead of sparklines.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
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
Summarize request volume and latency over the last hour
Plot a series over the last 6 hours

Filter 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.

rename

Change a deployment’s name. The new name must be unique among the model’s deployments and may contain only alphanumeric characters, hyphens, underscores, and periods. Run baseten model deployment describe to see the current values.

Options

TEXT
ID of the deployment.Mutually exclusive with other flags in group deployment-ref.
TEXT
Name of the deployment.Mutually exclusive with other flags in group deployment-ref.
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
required
New name for the deployment, unique among the model’s deployments. Only alphanumeric characters, hyphens, underscores, and periods are allowed.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
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

Rename a deployment

Filter output with --jq

Print the deployment’s new name

Output

Text mode (--output text): On success, prints “Renamed deployment id to name” to stderr; no stdout output. JSON mode (--output json): payload type managementapi.Deployment.

update-autoscaling

Update a deployment’s autoscaling settings. Only the flags you pass are changed; every other setting is left alone. Changes are applied asynchronously, so the response reports whether the request was accepted rather than the settled state. Run baseten model deployment 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
ID of the deployment.Mutually exclusive with other flags in group deployment-ref.
TEXT
Name of the deployment.Mutually exclusive with other flags in group deployment-ref.
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, none
TEXT
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 a deployment’s replica bounds
Shorten the scale-down delay, leaving every other setting unchanged

Filter output with --jq

Print just the status

Output

Text mode (--output text): The status of the request followed by the server’s message. JSON mode (--output json): payload type managementapi.UpdateAutoscalingSettingsResponse.

update-request-backpressure

Set the policy applied when a deployment’s request queue is full. Pass --policy null to clear an existing policy and fall back to the default. Run baseten model deployment describe to see the current values.

Options

TEXT
ID of the deployment.Mutually exclusive with other flags in group deployment-ref.
TEXT
Name of the deployment.Mutually exclusive with other flags in group deployment-ref.
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, none
TEXT
required
Backpressure policy to apply. Pass null to clear an existing policy.One of: queue-on-full, reject-on-full
TEXT
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 full
Clear the policy

Filter 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.RequestBackpressureSettings.