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 environment activate [OPTIONS]
Activate the deployment associated with an environment.

Options

--environment
TEXT
required
Name of the environment (e.g. 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
--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 the deployment associated with an environment
baseten model environment activate --model-id <model-id> --environment production

Filter output with --jq

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

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

baseten model environment deactivate [OPTIONS]
Deactivate the deployment associated with an environment. Prompts for yes/no confirmation. Pass —yes to skip the prompt. When stdin is not a terminal, —yes is required.

Options

--environment
TEXT
required
Name of the environment (e.g. 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
--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 an environment without the confirmation prompt
baseten model environment deactivate --model-id <model-id> --environment production --yes

Filter output with --jq

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

Output

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

fetch

baseten model environment fetch [OPTIONS]
Fetch a model environment by name.

Options

--environment
TEXT
required
Name of the environment (e.g. 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
--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 the production environment of a model
baseten model environment fetch --model-id <model-id> --environment production

Filter output with --jq

Print the current deployment ID
baseten model environment fetch --model-id <model-id> --environment production --jq '.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

baseten model environment list [OPTIONS]
List all environments 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 environments of a model
baseten model environment list --model-id <model-id>

Filter output with --jq

Print just the environment names
baseten model environment list --model-id <model-id> --jq '.environments[].name'

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.