Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.

Body

application/json
session_id
string
required

ID of the Loops session this sampler belongs to.

base_model
string | null

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

run_id
string | null

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_length
integer | null

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

model_path
string | null

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

Example:

"bt://loops:k4q95w5/sampler_weights/step-100"

reuse_from_session_id
string | null

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

Response

200 - application/json
sampler
LoopsSamplerV1 · object
required