UI Settings API
This page documents the 5 gateway endpoints tagged UI Settings in the gateway's OpenAPI document. Every example targets a gateway on http://localhost:4000 and authenticates with the SPANWAY_API_KEY environment variable, which holds the master key or a virtual key that has access to the route. Request and response fields are taken from the schema the running gateway publishes at /openapi.json, and the same document is bundled with this site as openapi.json.
| Method | Path | Summary |
|---|---|---|
| GET | /get/ui_settings | Read the Admin UI behaviour flags |
| PATCH | /update/ui_settings | Change the Admin UI behaviour flags |
| GET | /get/user_banner | Read the dashboard banner |
| PATCH | /update/user_banner | Publish, change or unpublish the dashboard banner |
| GET | /get/latest_release_info | Latest release the gateway can upgrade to |
Endpoints
GET /get/ui_settings
Read the Admin UI behaviour flags
Shows the switches that change how the Admin UI and some management routes behave for non-admin users, for
example whether internal users may add models or see the agents page, and whether the AI Hub is public.
source says per flag whether the value comes from the database, the config file, the environment or the
default. Anyone may call it without a key, because the Admin UI reads it before sign in. It changes nothing.
Docs (https://docs.spanway.ai/docs/admin_ui/admin_settings)
Example request:
curl -X GET "http://localhost:4000/get/ui_settings"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The stored flags with their schema and where each value comes from | application/json UISettingsResponse |
| 500 | The gateway runs without a database | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
values | object | Yes | Values |
field_schema | object | Yes | Field Schema |
source | object | Yes | Source |
PATCH /update/ui_settings
Change the Admin UI behaviour flags
Changes one or more Admin UI switches for every user. Only the flags you send change, and a flag the
deployment environment sets cannot be changed here. The flags are saved to the database, mirrored into the
running gateway and written to the audit log. Only proxy admins may call it, and it needs
store_model_in_db.
Docs (https://docs.spanway.ai/docs/admin_ui/admin_settings)
Request body (application/json, object):
| Field | Type | Required | Description |
|---|---|---|---|
disable_model_add_for_internal_users | boolean | No | On: only proxy admins can add models or auto routers, in the Admin UI or through the API, so nobody else can connect a new provider account and run up its bill. Team admins and members are refused. Off (the default): int |
disable_team_admin_delete_team_user | boolean | No | On: team admins cannot remove members from the teams they manage, in the Admin UI or through /team/member_delete and the bulk member delete route, which answer 403. Useful when an identity provider (SCIM) owns team membe |
enabled_ui_pages_internal_users | array of string or null | No | The Admin UI pages internal users see in the sidebar, as page keys, to keep the menu short for people who only need a few pages. Unset (the default): every page their role allows. It hides pages only, the API still check |
enable_public_model_hub | boolean | No | Off by default. When on, anyone who can reach this gateway can open the AI Hub and its /public hub endpoints without signing in, and sees the models, agents, MCP servers and skills you made public. When off, only signed |
require_auth_for_public_ai_hub | boolean | No | Older switch kept for existing setups. On: the AI Hub needs a sign in or a key even while enable_public_model_hub is on, so the hub stays private. Off (the default): enable_public_model_hub alone decides. Prefer turning |
allow_public_health_readiness_details | boolean | No | On: /health/readiness gives callers without a key the full details, such as the callbacks, cache and version, which helps a monitor that has no key but tells anyone who can reach the gateway how it is built. Off (the def |
forward_client_headers_to_llm_api | boolean | No | On: the gateway passes the caller's Authorization, anthropic-beta and x-* headers on to the model provider, which coding tools on a personal subscription and tracing headers need. Off (the default): those headers stay at |
forward_llm_provider_auth_headers | boolean | No | On: a provider key the caller sends (x-api-key, x-goog-api-key, api-key or ocp-apim-subscription-key) is used for that request instead of the key stored on the model, so people can bring their own provider account and pa |
disable_agents_for_internal_users | boolean | No | On: internal users cannot open the Agents page or call the agent management routes, for teams that should not build or change agents. Off (the default): they may, within their role. Proxy admins are never limited. |
allow_agents_for_team_admins | boolean | No | On: team admins keep agent access while disable_agents_for_internal_users is on, so each team still has someone who manages its agents. Off (the default): team admins are limited like other internal users. It does nothin |
disable_vector_stores_for_internal_users | boolean | No | On: internal users cannot open the Vector Stores page or call the vector store management routes, so only admins connect document stores. Off (the default): they may, within their role. Proxy admins are never limited. |
allow_vector_stores_for_team_admins | boolean | No | On: team admins keep vector store access while disable_vector_stores_for_internal_users is on. Off (the default): team admins are limited like other internal users. It does nothing while disable_vector_stores_for_interna |
scope_user_search_to_org | boolean | No | On: searching for users, for example when adding a team member, only finds people in the caller's own organizations, so one customer cannot list another's users. Off (the default): any signed in user can search every use |
disable_custom_api_keys | boolean | No | On: nobody may choose their own key value, every key is generated by the gateway, so no guessable or reused secret becomes a key. A request that sends a key value is refused with 403. Off (the default): callers may bring |
disable_key_generate_for_org_admin | boolean | No | On: organization admins cannot create keys with /key/generate, so only proxy admins and team members mint keys, for example when keys must come from one central process. Off (the default): organization admins may create |
enable_chat_ui | boolean | No | Off by default. On adds a Chat page where every signed-in user except view-only roles can chat with the models they may use and connect MCP tools with OAuth or their own key, so people get a chat window without a separat |
team_admin_editable_team_fields | array of enum: "max_budget", "member_key_budgets", "projects", "raise_max_budget", "rpm_limit", "tpm_limit" | No | Team settings fields a team admin may change on the teams they administer. With 'max_budget' alone a team admin may keep or lower the team budget; add 'raise_max_budget' to also let them raise it. A raise is capped by th |
Example request:
curl -X PATCH "http://localhost:4000/update/ui_settings" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"disable_model_add_for_internal_users": true,
"enable_public_model_hub": false
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The flags are stored and mirrored into general_settings | application/json SettingsUpdateResponse |
| 400 | A flag is set by the deployment environment, or team_admin_editable_team_fields names a field it does not support | application/json ErrorDetail |
| 401 | No valid key was sent, or the key belongs to someone who is not a proxy admin | application/json ProxyError |
| 403 | The key passed the route check but is not a proxy admin key, or a setting needs the enterprise build | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or store_model_in_db is off | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | What changed |
status | string | Yes | Always success, failures are reported as HTTP errors |
settings | object | Yes | The settings as stored |
GET /get/user_banner
Read the dashboard banner
The announcement a proxy admin published for every dashboard user, with its severity and the revision the
dashboard uses to show a dismissed banner again after a change. Any signed in user or key may read it. Without a
database the banner is always empty and disabled.
Docs (https://docs.spanway.ai/docs/admin_ui/user_banner)
Example request:
curl -X GET "http://localhost:4000/get/user_banner" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The banner as published, or an empty disabled banner when none was published | application/json UserBanner |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | No | If true, the banner is shown to all authenticated dashboard users. |
message | string | No | Banner text shown to dashboard users. Markdown is supported. |
severity | enum: "info", "warning", "error" | No | Visual style of the banner. |
revision | string | No | Server-stamped opaque publish identity; a fresh value is generated on every update so clients re-surface dismissed banners on republish. |
PATCH /update/user_banner
Publish, change or unpublish the dashboard banner
Replace the dashboard banner. Send enabled: false to take it down. Every save gets a new revision, so a user
who dismissed the previous text sees the new one. The change is written to the audit log. Proxy admin only.
Docs (https://docs.spanway.ai/docs/admin_ui/user_banner)
Request body (application/json, schema UserBannerUpdate):
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | No | If true, the banner is shown to all authenticated dashboard users. |
message | string | No | Banner text shown to dashboard users. Markdown is supported. |
severity | enum: "info", "warning", "error" | No | Visual style of the banner. |
Example request:
curl -X PATCH "http://localhost:4000/update/user_banner" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"message": "**Scheduled maintenance** on Saturday 06:00 to 07:00 UTC.",
"severity": "warning"
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The banner is stored with a fresh revision and shows on the next dashboard load | application/json UpdateUserBannerResponse |
| 401 | No valid key was sent, or the key belongs to someone who is not a proxy admin | application/json ProxyError |
| 403 | The key passed the route check through allowed_routes or a custom role but is not a proxy admin key | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | Message |
banner | UserBanner | Yes |
GET /get/latest_release_info
Latest release the gateway can upgrade to
The latest stable release from the feed in SPANWAY_RELEASE_CHECK_URL, with its changes counted as new features,
bug fixes and other updates. The dashboard compares it with the running version and shows the upgrade notice when
it is newer. The answer is null, never an error, when no feed is configured, SPANWAY_AIRGAPPED is set or the
feed did not answer, and a failed fetch is retried after five minutes. Any signed in user or key may read it.
Docs (https://docs.spanway.ai/docs/admin_ui/user_banner)
Example request:
curl -X GET "http://localhost:4000/get/latest_release_info" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The newest stable release, or null when no release feed is configured, the gateway is air-gapped or the feed did not answer | application/json LatestReleaseInfo |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
version | string | Yes | Version |
new_features | integer | Yes | New Features |
bug_fixes | integer | Yes | Bug Fixes |
other_updates | integer | Yes | Other Updates |
release_url | string | Yes | Release Url |