Skip to main content

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