Skip to content
Alphahelmstudio is early software: things will change, and some will break.What's newReport an issue

Replace the host's pinned components

PUT
/v1/studio/admin/hosts/{host}/pins
curl --request PUT \
--url http://localhost:8300/v1/studio/admin/hosts/example/pins \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "pins": [ { "env": "example", "component": "example", "model": "example", "variant": "example", "precision": "bf16", "compute": "float32", "loras": [ { "lora_id": "example", "strength": 1 } ] } ] }'

Admin only (403). Replaces the pins (duplicates collapsed), version + 1, published like the settings. A first PUT creates the row with the other settings copied from the freshest key’s policy. A pin keeps its entry loaded (keep_pinned, the idle unload) and is a hand-over victim only as the last resort (after every unpinned one, when the run would not fit otherwise: a pin never fails or holds a run; Run.unloads_pinned says so first); an admin unload still unloads it. An unloaded pin stays set. A pin need not be resident now. 404 for a host with no present hosts key. 422 env <env> is not on host <host>, <model> is not published by <host>.<env>.

host
required
string

Unknown or malformed = 404)

Media typeapplication/json
object
pins
required
Array<object>
<= 64 items

One resident entry’s identity (registry $defs/pin): what a resident component of GET /v1/studio/hosts shows, with its entry’s env

object
env
required
string
/^[a-z0-9]{1,32}$/
component
required
string
/^[a-z][a-z0-9_]{0,63}$/
model
required
string
/^[a-z0-9][a-z0-9_.-]{0,63}$/
variant
required
string
/^[a-z0-9][a-z0-9_-]{0,63}$/
precision
required
string
Allowed values: bf16 fp16 int8 int4 fp8 fp32
compute

The entry’s compute as GET /v1/studio/hosts shows it; absent = float32

string
Allowed values: float32 float16
loras

A baked set, in order (lora_id and strength as the admin’s hosts view shows them); absent or empty = the plain component

Array<object>
<= 32 items
object
lora_id
required
string
/^([0-9a-f]{64}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/
strength
required
number

The settings

Media typeapplication/json
object
host
required
string
version
required
integer
>= 1
after_run
required

What stays loaded once a run ends: unload = nothing; keep_warm = everything until memory is needed or the idle timeout passes (the default); keep_pinned = only the pins

string
Allowed values: unload keep_warm keep_pinned
idle_unload_min
required
integer
<= 1440
reserve_gb
required
number
reserve_mode
required

: auto = the macOS GPU limit when set (at most RAM − 4 GB), else device memory − RUNNER_RESERVE_GB; custom = device memory − reserve_gb (the default). Absent = custom (a PUT: unchanged)

string
Allowed values: auto custom
pins
required
Array<object>

One resident entry’s identity (registry $defs/pin): what a resident component of GET /v1/studio/hosts shows, with its entry’s env

object
env
required
string
/^[a-z0-9]{1,32}$/
component
required
string
/^[a-z][a-z0-9_]{0,63}$/
model
required
string
/^[a-z0-9][a-z0-9_.-]{0,63}$/
variant
required
string
/^[a-z0-9][a-z0-9_-]{0,63}$/
precision
required
string
Allowed values: bf16 fp16 int8 int4 fp8 fp32
compute

The entry’s compute as GET /v1/studio/hosts shows it; absent = float32

string
Allowed values: float32 float16
loras

A baked set, in order (lora_id and strength as the admin’s hosts view shows them); absent or empty = the plain component

Array<object>
<= 32 items
object
lora_id
required
string
/^([0-9a-f]{64}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/
strength
required
number
applied
required

Every fresh hosts key of the host (but a local server’s server env, which holds no weights) reports policy.settings_version = version

boolean
updated_at
required
string format: date-time

Example

{
"after_run": "unload",
"reserve_mode": "auto",
"pins": [
{
"precision": "bf16",
"compute": "float32"
}
]
}

Missing or invalid x-api-key (Kong), or missing/invalid/expired/revoked bearer token

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Valid token without the admin role: “admin role required”

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Not found

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Invalid input

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}

Retryable

Media typeapplication/json
object
detail
required
string

Example generated

{
"detail": "example"
}