Skip to main content
POST
/
v1
/
loops
/
samplers
cURL
curl --request POST \
--url https://api.baseten.co/v1/loops/samplers \
--header "Authorization: Bearer $BASETEN_API_KEY" \
--data '{
  "session_id": null,
  "base_model": null,
  "max_seq_length": null,
  "model_path": "bt://loops:k4q95w5/sampler_weights/step-100",
  "reuse_from_session_id": null
}'
{
  "sampler": {
    "id": "<string>",
    "base_url": "<string>",
    "base_model": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "model_id": "<string>",
    "deployment_id": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.baseten.co/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Pass your Baseten API key. Clients automatically send Authorization: Bearer <key>. Direct callers can also use Authorization: Api-Key <key>; both schemes are accepted.

Body

application/json
session_id
string
required

ID of the Loops session this sampler belongs to.

base_model
string
required

Base model ID for standalone samplers (e.g., for baselines).

max_seq_length
integer | null

Maximum prompt length (in tokens) the sampler must handle. Set this to the longest prompt you plan to send. Omit to use the default for the base model.

model_path
string | null

Optional bt:// URI of an existing sampler-target checkpoint to load weights from on startup. 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 whose deployment should be reused for this sampler. Same best-effort semantics as the run endpoint.

Response

200 - application/json
sampler
LoopsSamplerV1 · object
required