Create or replace a local server or a remote provider
const url = 'http://localhost:8300/v1/studio/admin/providers/example';const options = { method: 'PUT', headers: { 'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"kind":"server","api":"openai","title":"example","base_url":"example","models":["example"],"default_model":"example","enabled":true,"timeout_s":120,"host":"example","memory_gb":1,"key_secret":"provider-openai","max_in_flight":2,"compat":{"temperature":true,"strict_schema":true,"headers":{"additionalProperty":"example"}},"preset":"example","thinking":{"additionalProperty":"off"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:8300/v1/studio/admin/providers/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "kind": "server", "api": "openai", "title": "example", "base_url": "example", "models": [ "example" ], "default_model": "example", "enabled": true, "timeout_s": 120, "host": "example", "memory_gb": 1, "key_secret": "provider-openai", "max_in_flight": 2, "compat": { "temperature": true, "strict_schema": true, "headers": { "additionalProperty": "example" } }, "preset": "example", "thinking": { "additionalProperty": "off" } }'Admin only (403). 201 when created, 200 when replaced; a change applies to batches submitted after it (a batch calls the provider as it was at Submit). 422 for a base_url that breaks the host rule, a default_model not in models, a server without host or memory_gb, a remote without key_secret. 409 remote models are off on this deployment for kind remote while the deployment’s switch is off, and <name> is a <kind>; delete it first to change a provider’s kind. From setting(no rule of its preset covers it, or it always thinks) andthinking:
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A provider’s name (unknown = 404 on DELETE and test; malformed = 404)
Request Bodyrequired
Section titled “Request Bodyrequired”Create or replace a provider. server: http(s) base_url whose host is a loopback or private address, or what host.docker.internal resolves to there, or a name that resolves only to such (checked again at every call); host and memory_gb required. remote: https base_url, key_secret required, refused (409) unless the deployment has remote models on.
object
Server: a local server you run (loopback or private address, or the Docker host: what host.docker.internal resolves to); remote: outside the machine (https; only when the deployment has remote models on); only with remote models on; never a model source)
Absent = openai; kind search needs brave, the others openai (422)
Absent = the first of models
Remote and search: required
What a provider’s OpenAI layer refuses of what pipelines sends (messages defs providerCompat; from a preset, Anthropic’s). temperature false: none sent; strict_schema true: json_schema with strict true, never retried as json_object; Absent = the usual calls
object
Fixed extra headers sent on every call to the provider (chat, Test, Fetch, the key check); only allow-listed safe names (never authorization, x-api-key, cookie, host): anthropic-version (Anthropic’s preset: 2023-06-01)
object
The preset the form was filled from
: a thinking level per model. Each key is one of models, each level one its rule allows (else 422 naming the model; a model no rule covers is 422 too). Absent or {} = nothing sent: the provider’s own default. Studio resolves it into the batch snapshot (messages defs providerThinking)
object
Off + on, or some of off, low, medium, high (our high is the provider’s high, never max)
Responses
Section titled “Responses”Replaced
One model provider as the admin sees it.
object
Server: a local server you run (loopback or private address, or the Docker host: what host.docker.internal resolves to); remote: outside the machine (https; only when the deployment has remote models on); only with remote models on; never a model source)
Openai: OpenAI-compatible /v1/chat/completions (ChatOpenAI(base_url=…))
What users see (Ollama on the Mac); absent = name
The models pipelines may name
One of models (server:<name> without a model)
Server: the GPU host whose memory it shares
Server: declared; the host reserves it while enabled
Remote: the secret file’s name
Remote: calls in flight at once (default 2)
What a provider’s OpenAI layer refuses of what pipelines sends (messages defs providerCompat; from a preset, Anthropic’s). temperature false: none sent; strict_schema true: json_schema with strict true, never retried as json_object; Absent = the usual calls
object
Fixed extra headers sent on every call to the provider (chat, Test, Fetch, the key check); only allow-listed safe names (never authorization, x-api-key, cookie, host): anthropic-version (Anthropic’s preset: 2023-06-01)
object
The preset it was filled from
: a thinking level per model. Each key is one of models, each level one its rule allows (else 422 naming the model; a model no rule covers is 422 too). Absent or {} = nothing sent: the provider’s own default. Studio resolves it into the batch snapshot (messages defs providerThinking)
object
Off + on, or some of off, low, medium, high (our high is the provider’s high, never max)
(read only): what each saved model offers, for the models its preset’s rules cover (absent: no control). The form and the AI agents tab need no copy of the rules
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)
(read only): an Only-you provider’s owner, the admin who added it from a personal plugin. Only that account sees or uses it (every list, the AI agents picker, pipeline rules, the assistant); absent = everyone’s
(read only): the plugin it was made from (Add as provider)
Example
{ "kind": "server", "api": "openai", "base_url": "http://host.docker.internal:11434/v1", "thinking": { "additionalProperty": "off" }, "thinking_levels": { "additionalProperty": { "levels": [ "off" ], "default": "off" } }}Created
One model provider as the admin sees it.
object
Server: a local server you run (loopback or private address, or the Docker host: what host.docker.internal resolves to); remote: outside the machine (https; only when the deployment has remote models on); only with remote models on; never a model source)
Openai: OpenAI-compatible /v1/chat/completions (ChatOpenAI(base_url=…))
What users see (Ollama on the Mac); absent = name
The models pipelines may name
One of models (server:<name> without a model)
Server: the GPU host whose memory it shares
Server: declared; the host reserves it while enabled
Remote: the secret file’s name
Remote: calls in flight at once (default 2)
What a provider’s OpenAI layer refuses of what pipelines sends (messages defs providerCompat; from a preset, Anthropic’s). temperature false: none sent; strict_schema true: json_schema with strict true, never retried as json_object; Absent = the usual calls
object
Fixed extra headers sent on every call to the provider (chat, Test, Fetch, the key check); only allow-listed safe names (never authorization, x-api-key, cookie, host): anthropic-version (Anthropic’s preset: 2023-06-01)
object
The preset it was filled from
: a thinking level per model. Each key is one of models, each level one its rule allows (else 422 naming the model; a model no rule covers is 422 too). Absent or {} = nothing sent: the provider’s own default. Studio resolves it into the batch snapshot (messages defs providerThinking)
object
Off + on, or some of off, low, medium, high (our high is the provider’s high, never max)
(read only): what each saved model offers, for the models its preset’s rules cover (absent: no control). The form and the AI agents tab need no copy of the rules
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)
(read only): an Only-you provider’s owner, the admin who added it from a personal plugin. Only that account sees or uses it (every list, the AI agents picker, pipeline rules, the assistant); absent = everyone’s
(read only): the plugin it was made from (Add as provider)
Example
{ "kind": "server", "api": "openai", "base_url": "http://host.docker.internal:11434/v1", "thinking": { "additionalProperty": "off" }, "thinking_levels": { "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"}The resource’s state forbids this
object
Example generated
{ "detail": "example"}Invalid input
object
Example generated
{ "detail": "example"}Retryable
object
Example generated
{ "detail": "example"}