v1

latestOpenAPI 3.1.02026-07-26157321426.3 KB

Creates a Loops sampler

Creates a standalone Loops sampler not linked to a run.

post/v1/loops/samplers

Request body

session_idstring required

ID of the Loops session this sampler belongs to.

base_modelstring nullable

Base model ID for a standalone sampler (for example, a baseline).

run_idstring nullable

ID of an existing run to attach this sampler to. When set, the sampler is paired to the run and weight-syncs from its trainer, and base_model is inherited from the run. Omit to create a standalone sampler.

max_seq_lengthinteger nullable

Maximum prompt length (in tokens) the sampler must handle. Set this to the longest prompt you plan to send.

model_pathstring nullable

bt:// URI of an existing sampler checkpoint to serve. Form: bt://loops:<run_id>/sampler_weights/<checkpoint_name>.

reuse_from_session_idstring nullable

Optional Loops session ID to reuse infrastructure from. Best-effort.

Example request

{
  "model_path": "bt://loops:k4q95w5/sampler_weights/step-100"
}

Response