A preset's Fetch — the models its provider lists
const url = 'http://localhost:8300/v1/studio/admin/provider-presets/example/models';const options = { method: 'POST', headers: { 'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"key_secret":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”A preset’s Fetch. Only the key file’s name: the URL always comes from the preset (a base_url here is 422)
object
Absent = the preset’s
Example generated
{ "key_secret": "example"}Responses
Section titled “Responses”The result
object
What its /models listed
With ?model=: its answer to a tiny prompt
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
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
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
Off + on, or some of off, low, medium, high (our high is the provider’s high, never max)
Example
{ "failure": "network", "thinking": { "additionalProperty": { "levels": [ "off" ], "default": "off" } }}Missing or invalid x-api-key (Kong), or missing/invalid/expired/revoked bearer token
object
Example generated
{ "detail": "example"}Valid token without the admin role: “admin role required”
object
Example generated
{ "detail": "example"}Not found
object
Example generated
{ "detail": "example"}Invalid input
object
Example generated
{ "detail": "example"}Retryable
object
Example generated
{ "detail": "example"}