Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.baseten.co/llms.txt

Use this file to discover all available pages before exploring further.

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
--remote-url
TEXT
Baseten remote URL, overrides BASETEN_REMOTE_URL (default https://app.baseten.co)
--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
--remote-url
TEXT
Baseten remote URL, overrides BASETEN_REMOTE_URL (default https://app.baseten.co)
--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
--remote-url
TEXT
Baseten remote URL, overrides BASETEN_REMOTE_URL (default https://app.baseten.co)
--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.
--remote-url
TEXT
Baseten remote URL, overrides BASETEN_REMOTE_URL (default https://app.baseten.co)
--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.
--remote-url
TEXT
Baseten remote URL, overrides BASETEN_REMOTE_URL (default https://app.baseten.co)
--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
--remote-url
TEXT
Baseten remote URL, overrides BASETEN_REMOTE_URL (default https://app.baseten.co)
--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.

fetch

baseten model deployment fetch [OPTIONS]
Fetch 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
--remote-url
TEXT
Baseten remote URL, overrides BASETEN_REMOTE_URL (default https://app.baseten.co)
--team
TEXT
Team name or ID. Only valid with —model-name.
-v, --verbose
BOOL
Enable verbose logging

Examples

Fetch a deployment by ID
baseten model deployment fetch --model-id <model-id> --deployment-id <deployment-id>

Filter output with --jq

Print just the deployment status
baseten model deployment fetch --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
--remote-url
TEXT
Baseten remote URL, overrides BASETEN_REMOTE_URL (default https://app.baseten.co)
--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.

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 but —start is given, defaults 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)
--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
--remote-url
TEXT
Baseten remote URL, overrides BASETEN_REMOTE_URL (default https://app.baseten.co)
--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 but —end is given, defaults to 7 days before —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 —start, —end, or —since. 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
Tail live logs until the deployment leaves a runnable state
baseten model deployment logs --model-id <model-id> --deployment-id <deployment-id> --tail

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.