Skip to main content

activate

baseten model deployment activate [OPTIONS]
Activate a model deployment.

Options

--deployment-id
TEXT
required
ID of the deployment.
-q, --jq
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
--model-id
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
--model-name
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.
-o, --output
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
--profile
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
--team
TEXT
Team name or ID. Only valid with —model-name.
-v, --verbose
BOOL
Enable verbose logging

Examples

Activate a deployment
baseten model deployment activate --model-id <model-id> --deployment-id <deployment-id>

Filter output with --jq

Print just the success flag
baseten model deployment activate --model-id <model-id> --deployment-id <deployment-id> --jq '.success'

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

baseten model deployment config [OPTIONS]
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

--deployment-id
TEXT
required
ID of the deployment.
-q, --jq
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
--model-id
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
--model-name
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.
-o, --output
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
--profile
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
--team
TEXT
Team name or ID. Only valid with —model-name.
-v, --verbose
BOOL
Enable verbose logging

Examples

Print the deployment’s config.yaml
baseten model deployment config --model-id <model-id> --deployment-id <deployment-id>

Filter output with --jq

Extract the parsed model_name field
baseten model deployment config --model-id <model-id> --deployment-id <deployment-id> --jq '.config.model_name'

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

baseten model deployment deactivate [OPTIONS]
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

--deployment-id
TEXT
required
ID of the deployment.
-q, --jq
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
--model-id
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
--model-name
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.
-o, --output
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
--profile
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
--team
TEXT
Team name or ID. Only valid with —model-name.
--yes
BOOL
Skip the interactive confirmation prompt. Required when stdin is not a terminal.
-v, --verbose
BOOL
Enable verbose logging

Examples

Deactivate a deployment without the confirmation prompt
baseten model deployment deactivate --model-id <model-id> --deployment-id <deployment-id> --yes

Filter output with --jq

Print just the success flag
baseten model deployment deactivate --model-id <model-id> --deployment-id <deployment-id> --yes --jq '.success'

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

baseten model deployment download [OPTIONS]
Download the Truss 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

--deployment-id
TEXT
required
ID of the deployment.
-q, --jq
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
--model-id
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
--model-name
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.
--out-dir
TEXT
Extract the Truss tar into this directory.Mutually exclusive with other flags in group download-out.
--out-file
TEXT
Save the Truss as an uncompressed tar file at this path.Mutually exclusive with other flags in group download-out.
-o, --output
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
--overwrite
BOOL
Allow overwriting an existing file or non-empty directory.
--profile
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
--team
TEXT
Team name or ID. Only valid with —model-name.
-v, --verbose
BOOL
Enable verbose logging

Examples

Save the Truss as a tar file
baseten model deployment download --model-id <model-id> --deployment-id <deployment-id> --out-file truss.tar
Extract the Truss into a directory
baseten model deployment download --model-id <model-id> --deployment-id <deployment-id> --out-dir ./truss

Filter output with --jq

Print just the destination path
baseten model deployment download --model-id <model-id> --deployment-id <deployment-id> --out-file truss.tar --jq '.out_file'

Output

Text mode (--output text): Writes the Truss 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

baseten model deployment promote [OPTIONS]
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

--deployment-id
TEXT
required
ID of the deployment.
--environment
TEXT
default:"production"
Target environment name. Defaults to production.
-q, --jq
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
--model-id
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
--model-name
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.
-o, --output
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
--override-env-instance-type
BOOL
Use this deployment’s instance type instead of preserving the target environment’s.
--profile
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
--team
TEXT
Team name or ID. Only valid with —model-name.
--yes
BOOL
Skip the interactive confirmation prompt. Required when stdin is not a terminal.
-v, --verbose
BOOL
Enable verbose logging

Examples

Promote a deployment to production without the confirmation prompt
baseten model deployment promote --model-id <model-id> --deployment-id <deployment-id> --yes
Promote to a non-production environment using the deployment’s own instance type
baseten model deployment promote --model-id <model-id> --deployment-id <deployment-id> --environment staging --override-env-instance-type --yes

Filter output with --jq

Print the promoted deployment’s status
baseten model deployment promote --model-id <model-id> --deployment-id <deployment-id> --yes --jq '.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

baseten model deployment delete [OPTIONS]
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

--deployment-id
TEXT
required
ID of the deployment.
-q, --jq
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
--model-id
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
--model-name
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.
-o, --output
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
--profile
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
--team
TEXT
Team name or ID. Only valid with —model-name.
--yes
BOOL
Skip the interactive confirmation prompt. Required when stdin is not a terminal.
-v, --verbose
BOOL
Enable verbose logging

Examples

Delete a deployment without the confirmation prompt
baseten model deployment delete --model-id <model-id> --deployment-id <deployment-id> --yes

Filter output with --jq

Print the deleted deployment’s ID
baseten model deployment delete --model-id <model-id> --deployment-id <deployment-id> --yes --jq '.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

baseten model deployment describe [OPTIONS]
Describe a model deployment by ID.

Options

--deployment-id
TEXT
required
ID of the deployment.
-q, --jq
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
--model-id
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
--model-name
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.
-o, --output
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
--profile
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
--team
TEXT
Team name or ID. Only valid with —model-name.
-v, --verbose
BOOL
Enable verbose logging

Examples

Describe a deployment by ID
baseten model deployment describe --model-id <model-id> --deployment-id <deployment-id>

Filter output with --jq

Print just the deployment status
baseten model deployment describe --model-id <model-id> --deployment-id <deployment-id> --jq '.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

baseten model deployment list [OPTIONS]
List all deployments of a model.

Options

-q, --jq
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
--model-id
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
--model-name
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.
-o, --output
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
--profile
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
--team
TEXT
Team name or ID. Only valid with —model-name.
-v, --verbose
BOOL
Enable verbose logging

Examples

List all deployments of a model
baseten model deployment list --model-id <model-id>

Filter output with --jq

Print just the deployment IDs
baseten model deployment list --model-id <model-id> --jq '.deployments[].id'

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

baseten model deployment logs [OPTIONS]
Fetch logs for a model deployment. By default returns logs from the server’s default recent window. 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

--deployment-id
TEXT
required
ID of the deployment.
--end
TEXT
End of the log 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.
--excludes
TEXT (repeatable)
Case-sensitive substring; lines containing it are dropped. May be repeated.
--includes
TEXT (repeatable)
Case-sensitive substring that must appear in the log message. May be repeated; all must match.
-q, --jq
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
--min-level
TEXT
Only return logs at or above this severity level.One of: debug, info, warning, error
--model-id
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
--model-name
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.
-o, --output
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
--profile
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
--replica
TEXT
Only return logs emitted by this replica (5-char short ID).
--request-id
TEXT
Only return logs tagged with this inference request ID.
--search-pattern
TEXT
RE2 regular expression matched against the log message. Prefer —includes and —excludes for plain substring matches.
--since
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.
--start
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. If omitted, the server defaults the start to 30 minutes before the end. Window must be at most 7 days.
--tail
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.
--team
TEXT
Team name or ID. Only valid with —model-name.
-v, --verbose
BOOL
Enable verbose logging

Examples

Print logs for a deployment over the last hour
baseten model deployment logs --model-id <model-id> --deployment-id <deployment-id> --since 1h
Print logs for a fixed time range
baseten model deployment logs --model-id <model-id> --deployment-id <deployment-id> --start 2026-05-14T00:00:00Z --end 2026-05-15T00:00:00Z
Tail live logs until the deployment leaves a runnable state
baseten model deployment logs --model-id <model-id> --deployment-id <deployment-id> --tail
Filter to warnings and above that contain a term
baseten model deployment logs --model-id <model-id> --deployment-id <deployment-id> --min-level warning --includes timeout

Filter output with --jq

Stream just the log messages as a JSONL stream
baseten model deployment logs --model-id <model-id> --deployment-id <deployment-id> --output jsonl --jq '.message'

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

baseten model deployment metrics [OPTIONS]
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, and select metrics with one or more --metric flags.

Options

--deployment-id
TEXT
required
ID of the deployment.
--end
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.
-q, --jq
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
--metric
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.
--mode
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
--model-id
TEXT
ID of the model.Mutually exclusive with other flags in group model-ref.
--model-name
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.
--no-chart
BOOL
For —mode series, emit a per-step table instead of sparklines.
-o, --output
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
--profile
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
--since
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.
--start
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.
--team
TEXT
Team name or ID. Only valid with —model-name.
-v, --verbose
BOOL
Enable verbose logging

Examples

Show a current snapshot of the default metrics
baseten model deployment metrics --model-name <model-name> --deployment-id <deployment-id>
Summarize request volume and latency over the last hour
baseten model deployment metrics --model-id <model-id> --deployment-id <deployment-id> --mode summary --since 1h --metric baseten_inference_requests_total --metric baseten_end_to_end_response_time_seconds
Plot a series over the last 6 hours
baseten model deployment metrics --model-id <model-id> --deployment-id <deployment-id> --mode series --since 6h

Filter output with --jq

Print the metric names returned
baseten model deployment metrics --model-id <model-id> --deployment-id <deployment-id> --jq '.metric_descriptors[].name'

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 cmd.DeploymentMetricsResult.