Set the assistant on or off, its provider and model, web search and the caps
const url = 'http://localhost:8300/v1/studio/admin/assistant';const options = { method: 'PUT', headers: { 'x-api-key': '<x-api-key>', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"enabled":true,"provider":"example","model":"example","web_search":false,"search_provider":"example","limits":{"model_calls_per_day":2000,"tokens_per_day":20000000,"look_at_per_hour":200,"messages_per_minute":30,"auto_takes_per_hour":8,"auto_gpu_minutes_per_hour":30},"window_tokens":1}'};
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/assistant \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "enabled": true, "provider": "example", "model": "example", "web_search": false, "search_provider": "example", "limits": { "model_calls_per_day": 2000, "tokens_per_day": 20000000, "look_at_per_hour": 200, "messages_per_minute": 30, "auto_takes_per_hour": 8, "auto_gpu_minutes_per_hour": 30 }, "window_tokens": 1 }'Admin only (403). Applies from each chat’s next input. 422 when enabled without a provider, for a provider that is not an enabled server or remote, a model not in its models, or a search provider that is not an enabled provider of kind search; 409 remote models are off on this deployment for a remote provider or web search while the deployment’s switch is off.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Absent = unchanged
object
Takes Auto mode may start for one user in an hour (0: Auto never generates); a PUT without it keeps the current one
GPU minutes (the runs’ estimates) Auto mode may start for one user in an hour; a PUT without it keeps the current one
The chat window of the provider and model this PUT sets; absent = unchanged
Responses
Section titled “Responses”The settings
The admin’s assistant settings (Hub › Assistant)
object
A server or remote provider’s name
One of its models; null = its default_model
provider is the caller’s own Only-you provider: only the caller’s chats use it; everyone else’s use the deployment’s provider. A PUT naming an Only-you provider sets the caller’s own choice (the deployment’s stays); naming another clears it and sets the deployment’s
Web search’s own egress switch (off by default)
A provider of kind search
object
Takes Auto mode may start for one user in an hour (0: Auto never generates); a PUT without it keeps the current one
GPU minutes (the runs’ estimates) Auto mode may start for one user in an hour; a PUT without it keeps the current one
The deployment’s switch (REMOTE_MODELS): a remote provider and web search need it
Null before the first PUT
The chat window of provider and model (each model keeps its own; 60000 until set): past 70% of it the oldest half of a chat folds into a running summary
Example
{ "limits": { "model_calls_per_day": 2000, "tokens_per_day": 20000000, "look_at_per_hour": 200, "messages_per_minute": 30, "auto_takes_per_hour": 8, "auto_gpu_minutes_per_hour": 30 }, "window_tokens": 60000}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"}