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

A preset's Fetch — the models its provider lists

POST
/v1/studio/admin/provider-presets/{id}/models
curl --request POST \
--url http://localhost:8300/v1/studio/admin/provider-presets/example/models \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "key_secret": "example" }'

Admin only (403). Studio builds the provider from the preset file (its kind, base_url and compat; never a URL from the browser: a body with base_url is 422), key_secret from the body or the preset, timeout_s 15, and asks pipelines.providers.test without a model (30 s, else 503). The host rule and the remote switch apply as for Test: a remote preset while the switch is off is 200 with ok false and failure off. 404 for an unknown preset. A saved provider fetches through POST /v1/studio/admin/providers/{name}/test without model.

id
required
string
/^[a-z][a-z0-9-]{0,31}$/
Media typeapplication/json

A preset’s Fetch. Only the key file’s name: the URL always comes from the preset (a base_url here is 422)

object
key_secret

Absent = the preset’s

string
/^[a-z0-9][a-z0-9_.-]{0,63}$/

Example generated

{
"key_secret": "example"
}

The result

Media typeapplication/json
object
ok
required
boolean
models
required

What its /models listed

Array<string>
<= 1000 items
answer

With ?model=: its answer to a tiny prompt

string | null
error
required
string | null
failure
required

Network: unreachable, TLS, timeout, 5xx, 429; answer: a 4xx (401: the key) or not OpenAI-shaped; refused: the host rule; off: remote models are off

string | null
Allowed values: network answer refused off
seconds
required
number
thinking

What each listed model offers (only the models a rule covers): from the preset’s rules, or for a preset whose thinking is “models” (OpenRouter) from the provider’s /models answer (its reasoning supported_efforts and mandatory)

object
<= 1000 properties
key
additional properties

What one model offers: its levels (empty when it always thinks), always (thinks and cannot be set), default (what the provider uses when nothing is sent)

object
levels
required
Array<string>
<= 4 items unique items
Allowed values: off on low medium high
always
boolean
default

Off + on, or some of off, low, medium, high (our high is the provider’s high, never max)

string
Allowed values: off on low medium high

Example

{
"failure": "network",
"thinking": {
"additionalProperty": {
"levels": [
"off"
],
"default": "off"
}
}
}

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"
}