Skip to main content
Package training code with baseten train init and baseten train push, run it as a job, and deploy the checkpoints the job syncs. Projects group jobs and share a cache.

init

Create a training project directory, either empty from the built-in template or from one of the published training examples. This command needs no credentials: it only writes files, and the examples are downloaded from a public repository.

Options

TEXT
Directory to create. Defaults to ./truss-train-init for an empty project, or the current directory when examples are named.
TEXT (repeatable)
Name of a published training example to download instead of the empty template. Repeatable.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
BOOL
List the available example names and exit.
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
Run this truss executable instead of fetching one with uv, e.g. a virtualenv’s bin/truss. A value with no path separator is looked up on PATH, so ‘--truss-executable truss’ runs the truss you installed. Defaults to BASETEN_TRUSS_EXECUTABLE.
TEXT
Version of truss to fetch and run with ‘uv tool run’, e.g. 0.18.26. Defaults to BASETEN_TRUSS_VERSION, or the latest release. Mutually exclusive with --truss-executable.
BOOL
Enable verbose logging

Examples

Scaffold an empty training project
List the available examples
Download two examples into the current directory

Output

Text mode (--output text): A line per directory created, naming where it was written. With --list-examples, the available example names, one per line. JSON mode (--output json): payload type cmd.TrussDelegatedResult. Under --output json the text output goes to stderr and stdout is an empty object: this command reports nothing structured yet.

push

Create and start a training job, uploading the config file’s directory as the job’s code. The config is a Python file that defines the training project and its job, so it is executed rather than read. The flags below override what it declares. Returns once the job is created. Follow it with ‘baseten train job logs --job-id id --tail’.

Options

TEXT
Accelerator type and count, for example ‘H200:8’. Overrides the config. Supported hardware is documented at https://docs.baseten.co/training/concepts/basics.
TEXT
required
Python file defining the training project and its job.
TEXT
Command the job runs. Overrides the config.
TEXT
Start an interactive session on this trigger.One of: on-startup, on-failure, on-demand
TEXT
How long an interactive session stays up, as a duration (e.g. ‘90m’, ‘2h’). Rounded down to whole minutes; must be at least 1m.
TEXT
Name for the training job. Defaults to a generated name.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
INTEGER
Number of compute nodes. Overrides the config.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
INTEGER
Queue priority. Higher values are dequeued first.
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
BOOL
Run on interruptible spot capacity, overriding the config. Checkpointing your own progress is up to you.
TEXT
Team name or ID that owns the training project. Run ‘baseten org team list’ to see teams.
TEXT
Run this truss executable instead of fetching one with uv, e.g. a virtualenv’s bin/truss. A value with no path separator is looked up on PATH, so ‘--truss-executable truss’ runs the truss you installed. Defaults to BASETEN_TRUSS_EXECUTABLE.
BOOL
Do not forward this CLI’s credentials to truss, leaving it to resolve a remote from your trussrc. Old truss versions ignore forwarded credentials and use the trussrc regardless.
TEXT
Version of truss to fetch and run with ‘uv tool run’, e.g. 0.18.26. Defaults to BASETEN_TRUSS_VERSION, or the latest release. Mutually exclusive with --truss-executable.
BOOL
Enable verbose logging

Examples

Run a training job from a config file
Run a named job on eight H200s over spot capacity
Run a job that opens an interactive session if it fails

Output

Text mode (--output text): A confirmation that the job was created, with its ID, the commands to follow it, and a link to it in the Baseten UI. JSON mode (--output json): payload type cmd.TrussDelegatedResult. Under --output json the text output goes to stderr and stdout is an empty object: this command reports nothing structured yet.

job

Submit training jobs, then read their logs and metrics, change their priority, and stop or recreate them.

list

List training jobs, newest first. Lists every job in projects your teams can access. Pass --project to narrow to one project, or --status to narrow to particular job states.

Options

TEXT
default:"desc"
Sort order by creation time: ‘desc’ (newest first) or ‘asc’ (oldest first).One of: asc, desc
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
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 list jobs in this training project, by name or ID.
TEXT (repeatable)
Only list jobs in these states: pending, created, deploying, deploy-failed, running, completed, failed, stopped, preempted. Repeatable.
BOOL
Enable verbose logging

Examples

List every training job you can see
List the running jobs of one project
List jobs oldest first

Filter output with --jq

Print just the job IDs

Output

Text mode (--output text): Table with columns: ID, PROJECT, NAME, STATUS, INSTANCE TYPE, NODES, CREATED. When no jobs match, prints “No training jobs found.” to stderr. JSON mode (--output json): payload type managementapi.SearchTrainingJobsResponse.

describe

Describe a training job by ID, including its project, compute, and checkpoint sync state.

Options

TEXT
required
ID of the training job.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
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
BOOL
Enable verbose logging

Examples

Describe a job

Filter output with --jq

Print the job’s current status

Output

Text mode (--output text): A field-per-line summary of the job and its project. JSON mode (--output json): payload type managementapi.GetTrainingJobResponse.

logs

Fetch logs for a training job. Without --tail, returns the logs in a time window; with --tail, streams new logs until the job stops producing them or you interrupt with Ctrl-C.

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
ID of the training job.
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
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 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 job stops producing them 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.
BOOL
Enable verbose logging

Examples

Fetch the last 30 minutes of logs
Stream logs as they arrive
Fetch a day of error logs

Filter output with --jq

Print just the log messages

Output

Text mode (--output text): One log line per row, timestamped. With --output jsonl, one JSON log record per line. JSON mode (--output json): payload type managementapi.GetLogsResponse.

metrics

Report CPU, memory, GPU, and storage metrics for a training job. Each series is reported as its most recent sample. Pass --start and --end, or --since, to select the window the samples come from.

Options

TEXT
End of the sample window. Accepts ISO 8601; values without a timezone designator are interpreted in the local timezone. Default is now.
TEXT
required
ID of the training job.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
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 sampling from a relative time ago until now. Accepts a duration (e.g. ‘30m’, ‘1h30m’) or ‘Nd’ (e.g. ‘3d’). Mutually exclusive with --start and --end.
TEXT
Start of the sample window. Accepts ISO 8601; values without a timezone designator are interpreted in the local timezone.
BOOL
Enable verbose logging

Examples

Report a job’s latest metrics
Report metrics sampled over the last hour

Filter output with --jq

Print the GPU utilization series

Output

Text mode (--output text): Table with columns: METRIC, NODE, VALUE, MEASURED. JSON mode (--output json): payload type managementapi.GetTrainingJobMetricsResponse.

stop

Stop a running or queued training job. Stopping is not reversible: use ‘baseten train job recreate’ to run the same configuration again. Checkpoints already synced remain accessible.

Options

TEXT
required
ID of the training job.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
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
BOOL
Skip the interactive confirmation prompt. Required when stdin is not a terminal.
BOOL
Enable verbose logging

Examples

Stop a job, confirming interactively
Stop a job without confirmation, for scripts

Filter output with --jq

Print the stopped job’s status

Output

Text mode (--output text): On success, prints the stopped job’s ID to stderr; no stdout output. JSON mode (--output json): payload type managementapi.StopTrainingJobResponse.

recreate

Create a new training job from an existing job’s configuration. The original job is left as it is. The new job gets a new ID and starts from the beginning.

Options

TEXT
required
ID of the training job.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
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
BOOL
Enable verbose logging

Examples

Rerun a job’s configuration

Filter output with --jq

Print just the new job’s ID

Output

Text mode (--output text): On success, prints the new job’s ID to stderr; no stdout output. JSON mode (--output json): payload type managementapi.RecreateTrainingJobResponse.

update

Update a queued training job’s priority. Higher values are dequeued first. Only jobs in the PENDING state can have their priority changed.

Options

TEXT
New capacity guarantee. ‘dedicated’ runs on on-demand capacity that is not preempted; ‘spot’ runs on interruptible capacity that may be preempted, and checkpointing your own progress is up to you.One of: dedicated, spot
TEXT
required
ID of the training job.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
INTEGER
New queue priority. Higher values are dequeued first.
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
BOOL
Enable verbose logging

Examples

Raise a queued job’s priority

Filter output with --jq

Print the job’s new priority

Output

Text mode (--output text): On success, prints the job’s ID and new priority to stderr; no stdout output. JSON mode (--output json): payload type managementapi.UpdateTrainingJobResponse.

download

Download the code archive that was uploaded with a training job 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. This is the job’s input code, not its checkpoints; use ‘baseten train checkpoint files’ for those.

Options

TEXT
required
ID of the training job.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
TEXT
Extract the artifact tar into this directory.Mutually exclusive with other flags in group download-out.
TEXT
Save the artifact 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
BOOL
Enable verbose logging

Examples

Extract a job’s code into a directory
Save the archive as a tar file instead of extracting it

Filter output with --jq

Print just the destination path

Output

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

job session

A running job can hold an interactive session on each replica. Describe those sessions.

describe

Describe the interactive sessions of a training job, one per replica. Only replicas with a live session are listed, so a job whose session has not started yet reports none.

Options

TEXT
required
ID of the training job.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
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
BOOL
Enable verbose logging

Examples

Show a job’s interactive sessions

Filter output with --jq

Print the first replica’s auth URL

Output

Text mode (--output text): Table with columns: REPLICA, SESSION, AUTH URL, EXPIRES. When no session is live, prints “No interactive sessions found.” to stderr. JSON mode (--output json): payload type managementapi.GetAuthCodesResponse.

capacity

Capacity is the number of GPUs of each type a team may use concurrently. Read the limits and raise them per team.

describe

Describe the organization’s training GPU limits and current usage, per GPU type. Per-team limits are listed below the organization totals when any are set.

Options

TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
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
BOOL
Enable verbose logging

Examples

Describe training GPU capacity

Filter output with --jq

Print the organization’s H100 limit

Output

Text mode (--output text): An organization table with columns: GPU TYPE, IN USE, LIMIT, BASELINE, then a per-team table with a leading TEAM column when teams have limits set. JSON mode (--output json): payload type managementapi.GetTrainingGpuCapacityResponse.

update

Update the maximum concurrent GPUs of one type that a team may use. The limit is per GPU type, so raising H100 leaves other types alone.

Options

TEXT
required
GPU type the limit applies to (for example H100).
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
INTEGER
required
Maximum concurrent GPUs of this type the team may use.
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
required
Team name or ID whose limit changes. Run ‘baseten org team list’ to see teams.
BOOL
Enable verbose logging

Examples

Raise a team’s H100 limit

Filter output with --jq

Print the applied limit

Output

Text mode (--output text): On success, prints the team, GPU type, and new limit to stderr; no stdout output. JSON mode (--output json): payload type managementapi.PatchTeamTrainingGpuCapacityResponse.

checkpoint

Jobs that enable checkpointing sync their checkpoints. List them, download their files, and deploy LoRA checkpoints as a model served by vLLM.

list

List the checkpoints a training job has synced, newest first. Checkpoints only appear for jobs that enabled checkpointing.

Options

TEXT
default:"desc"
Sort order by creation time: ‘desc’ (newest first) or ‘asc’ (oldest first).One of: asc, desc
TEXT
required
ID of the training job.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
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
BOOL
Enable verbose logging

Examples

List a job’s checkpoints
List a job’s checkpoints oldest first

Filter output with --jq

Print just the checkpoint IDs

Output

Text mode (--output text): Table with columns: ID, TYPE, BASE MODEL, SIZE, SYNC, CREATED. When the job has no checkpoints, prints “No checkpoints found.” to stderr. JSON mode (--output json): payload type managementapi.GetTrainingJobCheckpointsResponse.

files

List presigned download URLs for the files of a training job’s checkpoints. The URLs are short-lived. For machine-readable streaming, prefer --output jsonl over --output json.

Options

TEXT
required
ID of the training job.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
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
BOOL
Enable verbose logging

Examples

List every checkpoint file of a job
Save the URLs to a file for a download script

Filter output with --jq

Print just the download URLs

Output

Text mode (--output text): Table with columns: NODE, NAME, SIZE, MODIFIED, URL. When there are no files, prints “No checkpoint files found.” to stderr. JSON mode (--output json): payload type managementapi.CheckpointFile.

deploy

Deploy a training job’s LoRA checkpoints as a model served by vLLM. Without --config, the checkpoints and the model that serves them are chosen interactively. Pass --config for a repeatable deploy: it is a Python file defining a DeployCheckpointsConfig, so it is executed rather than read. The generated model config is written to disk either way, so a deploy can be re-run or edited by hand afterward.

Options

TEXT
Python file defining a DeployCheckpointsConfig: which checkpoints deploy and the model that serves them. The type is documented at https://docs.baseten.co/reference/sdk/training#deploycheckpointsconfig.
TEXT
Directory the generated model config is written to. Defaults to a directory under ./truss_configs.
BOOL
Write the generated model config without deploying anything.
TEXT
Training job whose checkpoints are deployed. Required unless --config names them.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
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
Run this truss executable instead of fetching one with uv, e.g. a virtualenv’s bin/truss. A value with no path separator is looked up on PATH, so ‘--truss-executable truss’ runs the truss you installed. Defaults to BASETEN_TRUSS_EXECUTABLE.
BOOL
Do not forward this CLI’s credentials to truss, leaving it to resolve a remote from your trussrc. Old truss versions ignore forwarded credentials and use the trussrc regardless.
TEXT
Version of truss to fetch and run with ‘uv tool run’, e.g. 0.18.26. Defaults to BASETEN_TRUSS_VERSION, or the latest release. Mutually exclusive with --truss-executable.
BOOL
Enable verbose logging

Examples

Deploy a job’s checkpoints, choosing them interactively
Deploy the checkpoints a config file names
Generate the model config without deploying

Output

Text mode (--output text): The new model and deployment IDs with links to the deployment’s logs, the path the model config was written to, and an example request naming the deployed checkpoints. With --dry-run, only the config path. JSON mode (--output json): payload type cmd.TrussDelegatedResult. Under --output json the text output goes to stderr and stdout is an empty object: this command reports nothing structured yet.

project

Projects group training jobs and share a cache.

list

List the training projects your teams can access, newest first.

Options

TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
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
BOOL
Enable verbose logging

Examples

List your training projects

Filter output with --jq

Print just the project names

Output

Text mode (--output text): Table with columns: ID, NAME, TEAM, LATEST JOB, LATEST STATUS, CREATED. When there are no projects, prints “No training projects found.” to stderr. JSON mode (--output json): payload type managementapi.ListTrainingProjectsResponse.

project cache

describe

Describe the files in a training project’s shared cache, largest first. The cache is shared by every job in the project and persists between runs.

Options

TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
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
required
Training project to describe, by name or ID.
TEXT
default:"size"
Sort the listing by ‘size’ (largest first) or ‘path’ (alphabetical).One of: size, path
BOOL
Enable verbose logging

Examples

Describe a project’s cache
Sort the cache listing by path

Filter output with --jq

Print the cached file paths

Output

Text mode (--output text): A total size line, then a table with columns: PATH, TYPE, SIZE, PERMISSIONS, MODIFIED. When the cache is empty, prints “Cache is empty.” to stderr. JSON mode (--output json): payload type managementapi.GetCacheSummaryResponse.

workstation

A workstation is a training job that holds GPUs for an interactive SSH session instead of running a script.

create

Create an SSH workstation: a training job that holds GPUs for an interactive session instead of running a training script. Pass --node-count for a multi-node workstation, where each node has eight GPUs and SLURM is set up across them. Connect once the job is running.

Options

TEXT
default:"H100"
GPU accelerator type.
TEXT
Training job whose latest checkpoint the workstation starts from.
TEXT
Path inside the container where checkpoints are written.
INTEGER
Size of the checkpoint volume in GiB.
BOOL
Attach checkpoint storage to the workstation.
INTEGER
Number of GPUs on a single node, 1 to 8. Mutually exclusive with --node-count.
TEXT
Docker base image the workstation runs.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
INTEGER
Number of eight-GPU nodes, 1 to 16. Mutually exclusive with --gpu-count.
TEXT
default:"slurm"
Multi-node orchestrator set up across the nodes.One of: slurm
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
Training project that owns the workstation. Defaults to ‘workstation-accelerator’.
BOOL
Run on interruptible spot capacity.
TEXT
Team name or ID that owns the training project. Run ‘baseten org team list’ to see teams.
TEXT
Run this truss executable instead of fetching one with uv, e.g. a virtualenv’s bin/truss. A value with no path separator is looked up on PATH, so ‘--truss-executable truss’ runs the truss you installed. Defaults to BASETEN_TRUSS_EXECUTABLE.
BOOL
Do not forward this CLI’s credentials to truss, leaving it to resolve a remote from your trussrc. Old truss versions ignore forwarded credentials and use the trussrc regardless.
TEXT
Version of truss to fetch and run with ‘uv tool run’, e.g. 0.18.26. Defaults to BASETEN_TRUSS_VERSION, or the latest release. Mutually exclusive with --truss-executable.
BOOL
Enable verbose logging

Examples

Create a single-GPU workstation
Create a four-node workstation with checkpoint storage

Output

Text mode (--output text): A confirmation that the workstation was created, with the ssh host of each node and the commands to view its logs or stop it. JSON mode (--output json): payload type cmd.TrussDelegatedResult. Under --output json the text output goes to stderr and stdout is an empty object: this command reports nothing structured yet.