Skip to main content

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.

MethodPathSummary
GET/get/ui_settingsRead the Admin UI behaviour flags
PATCH/update/ui_settingsChange the Admin UI behaviour flags
GET/get/user_bannerRead the dashboard banner
PATCH/update/user_bannerPublish, change or unpublish the dashboard banner
GET/get/latest_release_infoLatest 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:

StatusDescriptionBody
200The stored flags with their schema and where each value comes fromapplication/json UISettingsResponse
500The gateway runs without a databaseapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
valuesobjectYesValues
field_schemaobjectYesField Schema
sourceobjectYesSource

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):

FieldTypeRequiredDescription
disable_model_add_for_internal_usersbooleanNoOn: 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_userbooleanNoOn: 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_usersarray of string or nullNoThe 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_hubbooleanNoOff 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_hubbooleanNoOlder 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_detailsbooleanNoOn: /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_apibooleanNoOn: 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_headersbooleanNoOn: 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_usersbooleanNoOn: 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_adminsbooleanNoOn: 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_usersbooleanNoOn: 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_adminsbooleanNoOn: 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_orgbooleanNoOn: 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_keysbooleanNoOn: 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_adminbooleanNoOn: 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_uibooleanNoOff 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_fieldsarray of enum: "max_budget", "member_key_budgets", "projects", "raise_max_budget", "rpm_limit", "tpm_limit"NoTeam 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:

StatusDescriptionBody
200The flags are stored and mirrored into general_settingsapplication/json SettingsUpdateResponse
400A flag is set by the deployment environment, or team_admin_editable_team_fields names a field it does not supportapplication/json ErrorDetail
401No valid key was sent, or the key belongs to someone who is not a proxy adminapplication/json ProxyError
403The key passed the route check but is not a proxy admin key, or a setting needs the enterprise buildapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or store_model_in_db is offapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
messagestringYesWhat changed
statusstringYesAlways success, failures are reported as HTTP errors
settingsobjectYesThe 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:

StatusDescriptionBody
200The banner as published, or an empty disabled banner when none was publishedapplication/json UserBanner
401No valid key or Admin UI session was presentedapplication/json ProxyError

Response fields (200):

FieldTypeRequiredDescription
enabledbooleanNoIf true, the banner is shown to all authenticated dashboard users.
messagestringNoBanner text shown to dashboard users. Markdown is supported.
severityenum: "info", "warning", "error"NoVisual style of the banner.
revisionstringNoServer-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):

FieldTypeRequiredDescription
enabledbooleanNoIf true, the banner is shown to all authenticated dashboard users.
messagestringNoBanner text shown to dashboard users. Markdown is supported.
severityenum: "info", "warning", "error"NoVisual 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:

StatusDescriptionBody
200The banner is stored with a fresh revision and shows on the next dashboard loadapplication/json UpdateUserBannerResponse
401No valid key was sent, or the key belongs to someone who is not a proxy adminapplication/json ProxyError
403The key passed the route check through allowed_routes or a custom role but is not a proxy admin keyapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a databaseapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
messagestringYesMessage
bannerUserBannerYes

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:

StatusDescriptionBody
200The newest stable release, or null when no release feed is configured, the gateway is air-gapped or the feed did not answerapplication/json LatestReleaseInfo
401No valid key or Admin UI session was presentedapplication/json ProxyError

Response fields (200):

FieldTypeRequiredDescription
versionstringYesVersion
new_featuresintegerYesNew Features
bug_fixesintegerYesBug Fixes
other_updatesintegerYesOther Updates
release_urlstringYesRelease Url