Skip to main content
POST
/
v1
/
loops
/
runs
cURL
curl --request POST \
--url https://api.baseten.co/v1/loops/runs \
--header "Authorization: Bearer $BASETEN_API_KEY" \
--data '{
  "session_id": null,
  "base_model": null,
  "max_seq_len": null,
  "lora_rank": null,
  "seed": null,
  "scale_down_delay_seconds": null,
  "path": "bt://loops:k4q95w5/weights/step-100",
  "reuse_from_session_id": null
}'
{
  "run": {
    "id": "<string>",
    "session_id": "<string>",
    "base_model": "<string>",
    "base_url": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "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 run belongs to.

base_model
string
required

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

max_seq_len
integer | null

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_rank
integer
default:64

LoRA rank.

seed
integer | null

Random seed for reproducibility.

scale_down_delay_seconds
integer
default:3600

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

path
string | null

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

Example:

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

reuse_from_session_id
string | null

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, or its sampler is unhealthy, a new deployment is provisioned instead.

Response

200 - application/json
run
LoopsRunV1 · object
required