Skip to main content

create

Create a Loops session, a run for the given base model, and the run’s paired sampler. Returns as soon as the resources are provisioned. Both halves finish coming up in the background; poll with ‘baseten loops run describe’ or watch ‘baseten loops run logs’.

Options

TEXT
required
HuggingFace ID of the base model to fine-tune (for example ‘Qwen/Qwen3-8B’).
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
Display name for the run. Defaults to the base model.
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
INTEGER
Number of data-parallel trainer replicas. The trainer deployment runs this many copies of the model’s preset node group, so —replicas 4 on a 4-node preset provisions 16 nodes. Defaults to 1.
TEXT
Team name or ID that owns the run’s infrastructure. Defaults to the organization’s default team.
BOOL
Enable verbose logging

Examples

Create a run for a base model
Create a named run with four data-parallel trainer replicas

Filter output with --jq

Print just the new run’s ID

Output

Text mode (--output text): On success, prints the new run’s ID and base model to stderr; no stdout output. JSON mode (--output json): payload type managementapi.LoopsRun. The created run, including its paired sampler.

list

List Loops runs, newest first. Lists your own runs; pass —org to list every run in the organization, which adds an Owner column. Inactive runs are hidden unless you pass —all.

Options

BOOL
Include inactive runs.
TEXT
Only list runs of this base model.
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)
BOOL
List every run in the organization, with its owner, instead of only your own.
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 active runs
List every run in the organization, including inactive ones
List runs for one base model, oldest first

Filter output with --jq

Print just the run IDs

Output

Text mode (--output text): Table with columns: ID, OWNER (with —org), BASE MODEL, STATUS, CREATED. When no runs match, prints “No Loops runs found.” to stderr. JSON mode (--output json): payload type managementapi.ListLoopsRunsResponse.

describe

Describe a Loops run by ID, including its paired sampler.

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
ID of the Loops run.
BOOL
Enable verbose logging

Examples

Describe a run by ID

Filter output with --jq

Print the run’s sampler base URL

Output

Text mode (--output text): Field-per-line summary of the run, followed by its sampler when one exists. JSON mode (--output json): payload type managementapi.LoopsRun.

deactivate

Deactivate a Loops run, tearing down both the run and its paired sampler. Saved checkpoints remain accessible. Prompts for yes/no confirmation. Pass —yes to skip the prompt. When stdin is not a terminal, —yes is required.

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
ID of the Loops run.
BOOL
Skip the interactive confirmation prompt. Required when stdin is not a terminal.
BOOL
Enable verbose logging

Examples

Deactivate a run without the confirmation prompt

Filter output with --jq

Print the deactivated run’s base model

Output

Text mode (--output text): On success, prints “Deactivated Loops run id” to stderr; no stdout output. JSON mode (--output json): payload type managementapi.DeactivateLoopsRunResponse.

logs

Fetch logs for a Loops run. By default returns the run’s trainer logs; pass —sampler for the paired sampler’s logs instead, which are a separate stream. By default returns up to —limit lines from the last 30 minutes, newest first. Use —start/—end or —since to scope the window (max 7 days). Use —tail to stream live logs until the run stops producing them or you interrupt with Ctrl-C. For machine-readable streaming, prefer —output jsonl over —output json.

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
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
required
ID of the Loops run.
BOOL
Fetch the paired sampler’s logs instead of the run’s trainer logs.
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 run 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

Print a run’s trainer logs over the last hour
Tail the paired sampler’s logs

Filter output with --jq

Stream just the log messages as a JSONL stream

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.