Skip to main content

Enterprise

Spanway is commercially licensed. The gateway runs without a license, and a license key enables the enterprise features listed on this page. Licenses are signed tokens that the gateway verifies offline against a public key bundled with Spanway. There is no license server, nothing is sent to Spanway at startup, and air-gapped deployments work the same way as connected ones. To obtain a license, contact sales@spanway.ai.

A real-world scenario​

A gateway runs with a license that lists evals and compliance. The finance team now wants invoices, so the operator gets a reissued key that also lists billing. They replace the key, restart, and confirm that billing is in allowed_features before telling finance the Billing page is ready.

Steps​

  1. Put the new key in SPANWAY_LICENSE on every gateway container and restart them, as shown in Set the license key.

  2. Confirm the features with the API.

    curl http://localhost:4000/health/license -H "Authorization: Bearer $SPANWAY_MASTER_KEY"
  3. In the Admin UI, open the account menu at the bottom of the left sidebar and check that Tier reads Enterprise. Then open the page the feature belongs to, for example Billing, which no longer shows the license notice.

  4. Call one route of the feature to be sure the server agrees.

    curl http://localhost:4000/billing/account/list -H "Authorization: Bearer $SPANWAY_MASTER_KEY"

Expected result​

allowed_features lists billing (or *), the Billing page loads without a notice, and the route answers 200 instead of 403.

Set the license key​

Put the key in the SPANWAY_LICENSE environment variable of every gateway container, or in the environment_variables block of config.yaml. The same image runs every tier, so adding the key is the whole upgrade from Starter.

export SPANWAY_LICENSE="<your license key>"
docker run -p 4000:4000 -v "$PWD/config.yaml:/app/config.yaml" \
-e SPANWAY_MASTER_KEY -e SPANWAY_LICENSE \
registry.spanway.ai/spanway/spanway-ai:2.0.0 --config /app/config.yaml
environment_variables:
SPANWAY_LICENSE: os.environ/SPANWAY_LICENSE

The license is an RS256 signed token issued by Spanway. It carries the licensee, an expiry date, the list of licensed features (* for all features), and optional limits on the number of users and teams. An invalid, tampered or expired key is treated as no license, and the gateway keeps running with enterprise features disabled. A key that expires while the gateway runs stops granting its features from the day after its last valid day, and an hourly re-check turns the remaining Enterprise switches off without a restart. The key itself is never logged.

The key can also be set as general_settings.spanway_license in the config file or the database. It is unset by default, and once a config load reads it, it replaces the value of SPANWAY_LICENSE. Keep it in one place, the environment variable in a secret is the safer choice because the config file is often in version control.

Cloud marketplace listings on AWS, Azure and Google Cloud are planned and not available yet. Once a listing ships, a gateway installed from it will read its features from the marketplace entitlement instead and need no license key.

Verify the license​

curl http://localhost:4000/health/license -H "Authorization: Bearer $SPANWAY_API_KEY"
{
"has_license": true,
"license_type": "enterprise",
"expiration_date": "2027-03-31",
"allowed_features": ["*"],
"limits": {"max_users": 250, "max_teams": 40}
}

has_license is true whenever a key or a marketplace entitlement is configured, even an invalid or expired one, so read license_type to know whether the license is active. It is enterprise with an active license and starter without one, and an invalid or expired key answers starter with an empty allowed_features list. While it is starter, enterprise routes return 403 with a message that names the feature and explains how to set SPANWAY_LICENSE. The Admin UI shows the same status in the account menu.

Feature names​

A license lists the features it grants by name, or * for every feature. When the license is valid but does not list the feature a route needs, the route returns 403 with a message that names the missing feature, for example Your Spanway license does not include the 'billing' feature. Features outside this table, such as SSO and audit logs, only need a valid license.

Feature nameWhat it unlocks
access_requestsEvery /access_request route
admin_mcpThe hosted admin MCP server at /admin/mcp and the native Admin Assistant for Slack connect flow. Without it the mount does not start, every request to it is refused and the Slack connect page answers 403
agent_governanceAgent governance: identity provider binding, per-session limits, required trace ids, the kill switch, and agent runs in the run ledger
agent_server_toolsServer tools such as web fetch inside custom agents. Server tools on chat completions need no license
auto_routerMore than one auto router per routing capability, instead of one
billingEvery /billing route
cloudThe /cloud routes
code_graphEvery /code_graph route and the spanway_code MCP server of the code graph
complianceEvery /compliance route except evidence exports, and the data subject control in compliance reports
compliance_evidenceCompliance evidence exports and scheduled evidence generation
custom_agentsEvery /v1/custom_agents route and invoking a custom agent over A2A
custom_rolesEvery /role route
environmentsEvery /v1/environments route to export, plan, approve and apply environment promotion bundles
evalsEvery /eval route, including schedules and red teaming, and the scheduled eval runs themselves
guardrailsSetting guardrails, policies or disable_global_guardrails on keys, teams, organizations and projects, requests that use them, and dynamic guardrail extra_body params
human_approvalEvery /v1/approvals route for human approval policies and decisions. Policies that already exist stay enforced without it
ip_allowlistgeneral_settings.allowed_ips and setting allowed_ips on keys, teams, organizations and projects
key_controlsSetting tags or team_member_key_duration on keys, teams, organizations and projects
key_hygieneEvery /key/hygiene route, the unused key auto-expiry job, the maximum key lifetime (gateway wide and per organization) and the key expiry emails
organization_ssoEvery /organization/sso route, organization sign-in from the login page and organization-scoped SCIM tokens
passthrough_routesSetting allowed_passthrough_routes or denied_passthrough_routes on keys and teams, which is how a non-admin key is granted a custom pass-through route that requires a key. Organizations and projects refuse both fields
scoped_integrationsSetting logging, prompts or secret_manager_settings on keys, teams, organizations and projects
spend_reportsThe spend report endpoints /global/spend/report, /key/spend/report, /user/spend/report, /team/spend/report and /organization/spend/report
workflow_definitionsEvery /v1/workflows/definitions route, for saved workflow definitions. Running a definition also needs workflow_runner
workflow_historyThe workflow runner's step attempt history, re-run from a step and pinned test data. It also needs workflow_runner
workflow_queue_workersRunning workflow runner steps on dedicated workers, with the producer and worker roles and --workflow_worker. It also needs workflow_runner
workflow_retriesWorkflow runner retry policies, total step timeouts, on failure alerts and compensating runs, and the dead letter routes. The runner checks it again before it schedules or runs each retry, so a run whose licence lost it fails its step with feature_unlicensed instead of retrying. It also needs workflow_runner
workflow_runnerEvery /v1/workflows/runner route, the background workflow runner and the workflow runs storage routes under /v1/workflows/runs
workflow_subworkflowsWorkflow runner steps that call a saved workflow definition, and saving a definition version with such a step. The runner checks it again before each spawn, so a run tree stops spawning children with feature_unlicensed once the licence loses it. It also needs workflow_runner
workflow_templatesEvery /v1/workflow_templates route, to install workflow templates. Templates also need custom_agents and workflow_definitions, and running one needs workflow_runner
workflow_triggersEvery /v1/triggers route and the background workflow trigger jobs. Triggers also need workflow_runner
workload_identityThe /v1/workload-identity/token route that trades a trusted OIDC token for a short-lived virtual key, see workload identity federation

These fields need the feature whether they are sent as top-level request fields or inside metadata. Saving a record again with a value it already stores, or with an empty value, needs no license, so an existing record stays editable after a license change.

An allowed_ips list already stored on a key, team or organization keeps being enforced when the license lapses or drops ip_allowlist, so a license change never opens access. A gateway with general_settings.allowed_ips set refuses to start without the feature. Stored guardrails and policies make requests fail with 403 until the license lists guardrails again, rather than running without them.

Background jobs follow the same rule. Saved eval schedules stop firing and scheduled evidence generation stops when the license no longer lists their feature, and they resume once it does.

Licenses that list features by name must use the names in this table. A license issued with other names, such as sso or audit_logs, still counts as a valid license but grants none of the features above, so reissue it with * or with the names from this table.

The agent registry itself stays free. Registering agents, their A2A agent cards, invoking registered agents over A2A through the gateway, enabling and disabling them, their overall rpm_limit and tpm_limit and their spend work without a license.

What the license enables​

FeatureGuide
Custom roles with a permission catalogueCustom roles
Developer portal access requestsAccess requests
Compliance controls, retention, residency and data subject requestsCompliance
Billing accounts, invoices and Stripe collectionBilling
Evals that compare models on your datasetsEvals
Red teaming a model for vulnerabilitiesRed teaming
Hosted cloud edition with self-serve tenants and plansCloud
SCIM provisioning, IP allow-list, control plane and hosted admin MCPSCIM, allow-lists, control plane, admin MCP server
Single sign-on for more than 5 usersAdmin UI SSO
JWT auth and JWT key mappingsJWT auth
Regenerating virtual keys and scheduled key rotationScheduled key rotation
Organizations above teamsUser hierarchy
Audit logs of management actionsOn by default on a licensed gateway, set spanway_settings.store_audit_logs: true to keep it on if the license lapses, read with GET /audit
Your own logo, support contact and footer in notification emails (the emails themselves are free)Email
Enforced request parametersSee below
Spend reports by team, tag and customerSee below
API explorer branding and filteringSee below

Enforce required params for LLM requests​

enforced_params makes the gateway reject inference requests that do not carry certain fields, which guarantees that every request can be attributed. Nested fields use dot notation.

general_settings:
enforced_params:
- user
- metadata.generation_name

The list can also be set per key in the key's metadata.enforced_params, and for service account keys through general_settings.service_account_settings.enforced_params. The lists add up. Dot notation supports one level of nesting, such as metadata.generation_name. A request missing a field is rejected with a message such as BadRequest please pass param=user in request body. This is a required param. Without a license, setting enforced params makes requests fail with an error that says the feature needs an enterprise license.

Spend tracking​

Every request is costed and attributed to its key, user, team, organization, end user and tags. A license that includes spend_reports adds the spend report endpoints that aggregate this spend for chargeback.

curl "http://localhost:4000/global/spend/report?start_date=2026-09-01&end_date=2026-09-30&group_by=team" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

group_by accepts team, customer and api_key. GET /global/spend/tags reports spend per request tag, which lets you track cost per feature or project by sending x-spanway-tags or metadata.tags. The Usage page in the Admin UI charts the same data per team, organization, user, key, tag and customer. See cost tracking for how cost is calculated.

Swagger docs - custom routes and branding​

Every gateway serves an interactive API explorer at / and the OpenAPI document at /openapi.json to signed-in users, and answers 404 to everyone else, see API docs and build details. With a license you can brand and trim them for your developers.

VariableEffect
DOCS_TITLETitle shown in the explorer.
DOCS_DESCRIPTIONDescription shown under the title.
DOCS_FILTEREDSet to True to show only the OpenAI-compatible inference routes and hide management routes.
DOCS_URLServe the explorer at another path. Works without a license.
NO_DOCSTurn the explorer off. Works without a license.

License limits​

If a license sets max_users or max_teams, the gateway refuses to create the user or team that would go past the limit, so a license for 50 users allows exactly 50 billable users. /health/license reports the limits under limits, and the seat usage card in the Admin UI shows how many are in use. Contact sales@spanway.ai to change your limits.

Errors​

StatusMessageMeaning and fix
403Your Spanway license does not include the '<feature>' feature. Contact sales@spanway.ai to add it.The license is valid but lacks that feature. With no license at all the message is The '<feature>' feature needs a Spanway enterprise license. You must be a Spanway Enterprise user to use this feature.... Reissue it with the name from the table above, or with *.
403A message that names the feature and explains how to set SPANWAY_LICENSENo valid license reached the gateway. Check the variable inside the container.
403License is over limit. Please contact https://spanway.ai/support to upgrade your license.Creating this user or team would go past max_users or max_teams. Bulk user creation answers the same text as a problem of type license-limit-exceeded. Remove unused users or teams, or ask for a higher limit.
400Assigning team admins is a premium feature. You must be a Spanway Enterprise user to use this feature. ...Giving a team member the admin role needs a license. Add the member with the user role, or add a license.
403You must be a Spanway Enterprise user to use SSO for more than 5 users. ...SSO is configured without a license and more than 5 billable users exist. Add a license or unset the SSO settings.
400BadRequest please pass param=<field> in request body. This is a required paramenforced_params requires that field. Send it.
Startup failsgeneral_settings.allowed_ips is set and the license lacks ip_allowlistRemove the setting or add the feature.

Logs​

LevelLineMeaning
INFOLicense configured=<true or false> valid=<true or false> expires=<date> features=<n> fingerprint=<fingerprint>Written at startup, on a config load and on the hourly re-check. Normal. configured=true valid=false means the key is invalid or expired, so check it. The key is never logged.
WARNINGLicense validity changed: valid=<true or false>The hourly re-check found that the license became valid or stopped being valid, for example on its expiry day. Renew the key when it says false.
ERRORCannot load the license public key from <path>: <error> or License public key at <path> is not an RSA keyThe image's bundled public key cannot be read, so no license can be verified. Use an unmodified image.
DEBUGLicense rejected. error_type=<type>Why the last key failed verification, such as ExpiredSignatureError. Turn on debug logging to see it.
ERRORPREMIUM FEATURE: Reserving tpm/rpm by priority is a premium feature. ...A request asked for priority reservation without a valid license, so the reservation is skipped. Add a license or drop the priority.