v1

latestOpenAPI 3.1.02026-07-26157321426.3 KB

Creates a Loops run

Creates a Loops run with an associated sampler in the given session.

post/v1/loops/runs

Request body

session_idstring required

ID of the Loops session this run belongs to.

base_modelstring required

Base model ID (e.g. 'Qwen/Qwen3-8B').

namestring nullable

Optional display name for the run. Defaults to the base model name when omitted.

max_seq_leninteger nullable

Maximum prompt length (in tokens) the run must handle. Set this to the longest training example you plan to send. Defaults to the maximum supported by the model configuration.

lora_rankinteger

LoRA rank.

seedinteger nullable

Random seed for reproducibility.

scale_down_delay_secondsinteger

Seconds of inactivity before the run scales to zero. Must be between 1 and 3600 (1 hour). Defaults to 3600.

replicasinteger

Number of data-parallel trainer replicas. Each replica is one full copy of the model's preset node group, so the trainer deployment runs (preset node_count * replicas) nodes (e.g. replicas=4 on a 4-node preset → 16 nodes, 4 DP workers). Must be a positive integer. Defaults to 1.

pathstring nullable

Optional bt:// URI of an existing checkpoint to load weights from on startup. Form: bt://loops:<run_id>/weights/<checkpoint_name>.

reuse_from_session_idstring nullable

Optional Loops session ID whose trainer deployment should be reused for this run, sharing the infrastructure across sessions instead of provisioning fresh. The named session must belong to the same team. Reuse is best-effort: if the prior deployment is stopped, failed, its sampler is unhealthy, or this run requests replicas != 1, a new deployment is provisioned instead.

Example request

{
  "path": "bt://loops:k4q95w5/weights/step-100"
}

Response