Open WebUI API keys: when scripts and integrations need them
A team that wants a script, pipeline or internal tool to call Open WebUI without someone signing in each time needs an API key or an equivalent non-interactive credential. Open WebUI documents API keys as a built-in feature, and the decision to issue them is a governance question as much as a setup task: who may create a key, what it can reach and how quickly it can be cut off. Open WebUI's feature documentation lists API keys alongside SSO, role-based access control and authenticator-app MFA, which means keys should be designed as part of the same access model rather than bolted on afterward. Before any rollout, confirm the exact key settings in the release you run. This section assumes the behavior of v0.12.3, published October 16, 2026, and the release notes and Open WebUI features documentation are the reference for what each setting does in your version.
Keys fit best when a non-human process needs steady access to the same models or endpoints: a nightly evaluation job, a ticket-triage integration or a service that summarizes documents for an internal tool. Interactive users who sign in through your identity provider are usually better served by SSO sessions, and a service that must act for a specific person or be audited per user may fit an identity-provider token exchange more closely. Ask the owning team three questions: which identity the calls should be attributed to, which models and endpoints the job needs, and who is accountable when the credential must be rotated. If the answers point to a shared identity that no one owns, treat that as a design gap to close before issuing anything.
Writing that policy down is the part teams most often skip. Decide whether keys belong to a dedicated service account or to an individual, whether non-admin users may create keys at all, and how long a key should live before review. Confirm with your Open WebUI version whether keys can be restricted to particular endpoints and how revocation takes effect for sessions already in use. The later sections on endpoint limits, self-service creation and revocation build on these decisions, so settle them first and record them where your security and platform teams can review them.
Which API key settings to decide before rollout
This table compares the operator decisions that shape Open WebUI API key use: who creates keys, whether keys belong to a person or a service, endpoint limits, expiry and visibility. Read each row as a choice with a fit and a risk, then confirm in your own version which of these controls exist and where they are set.
| Decision | When it fits | Risk to carry |
|---|---|---|
| Who may create keys: admins only | Small teams or regulated tenants where every integration is requested and reviewed by an administrator before a key exists. | Admins become a bottleneck, and people may work around the process by sharing one admin's key. |
| Who may create keys: any signed-in user | Teams of developers or analysts who script against Open WebUI daily and need to self-serve without tickets. | Keys proliferate outside any inventory, and departing users may hold working credentials that nobody tracks. |
| Key tied to one user | Personal scripts that should act with the same permissions and model access as the person who owns them. | The key inherits that person's access, so it stops working or becomes overprivileged when roles change or the account is removed. |
| Key issued for a shared service | Automations, pipelines or internal tools that run independently of any one employee. | A shared key has no clear owner, usually lives in several places, and is hard to rotate without breaking every consumer at once. |
| Endpoint or scope limits on a key | Integrations that only call chat or model listing, so a leaked key cannot reach administrative or data endpoints. | Limits that are missing or set too broadly give a false sense of containment. Test each key's reach against its intended calls. |
| Expiry and rotation expectations | Keys used by contractors, time-boxed projects or any integration where a periodic replacement is practical to schedule. | Keys without expiry stay valid indefinitely. Rotation without a documented process causes outages or leaves old keys active. |
| Who can see other users' keys | Administrators who need to audit key inventory during an incident or offboarding review. | Broad visibility exposes key metadata to people who should not see it. Confirm whether key values are ever shown after creation. |
| Who can revoke other users' keys | Security or platform staff who must cut off a leaked or abandoned key without waiting for the owner. | If only the owner can revoke, a compromised or departed user's key may stay active. Assign revocation rights to a named role. |
How API keys differ from SSO sessions when users sign out
A signed-in browser session and an API key are separate credentials, and signing out of Open WebUI does not revoke an API key. The two have different lifetimes and different revocation paths, so an administrator who plans for one may leave the other open. Sign-out ends the browser session, while an API key stays valid until it is deleted or expires under the rules configured for it. Treat key revocation and session termination as two tasks with two checks.
The session side has a documented multi-replica risk. The scaling guide states that without Redis, signing out does not revoke tokens, which stay valid until they expire, by default after 4 weeks. In a single instance, that gap is easy to overlook. In a deployment with several replicas, Redis is the shared store for sessions, websocket connections and application state, and PostgreSQL replaces SQLite as the database. Confirm that both are in place before you rely on sign-out as a containment step, and record the session lifetime your deployment actually uses, since the default may not match your policy.
The API key revocation path is the one you must test in your own environment. Delete a test key in the admin or user settings, then send a request with it to an endpoint it previously reached and confirm the request is refused. Repeat the test against each replica behind your load balancer, since a stale cache or an incomplete shared-state setup could let one replica accept the key longer than the others. Document the result and the time it took, and include this test in every change to the Redis or PostgreSQL configuration.
How to set up API key access in Open WebUI
This sequence turns API key access from an open question into a tested policy: a confirmed release, a chosen key policy, controlled key creation, a verified test key, recorded owners and a post-upgrade retest.
Confirm the release and deployment type
Record the exact Open WebUI version, how it is deployed (Docker, Docker Compose, Kubernetes with Helm, or pip), and whether it runs as one replica or several. Check the version against the project's GitHub releases page, since the latest published release is v0.12.3 as of October 16, 2026, and confirm which license terms apply to that version. Multi-replica setups need PostgreSQL, Redis and an external vector database before keys can be trusted, because without Redis signing out does not revoke tokens. Done when the version, deployment type and replica count are written in the change record and a reviewer has signed off on them.
Decide the key policy from the options table
Before anyone clicks a setting, the security owner and the platform owner agree on who may hold keys, which endpoints each use case needs, and what happens to keys when a person leaves. Write the policy as a short table: user group, purpose, allowed endpoints, owner and review interval. Confirm with your Open WebUI build which API key settings are exposed in the admin panel, since option names change between releases. Done when the table is approved and every row names one accountable owner.
Restrict API key creation to intended groups
As an administrator, open the admin settings and set who can create API keys, enabling the option only for the groups the policy names. Use Open WebUI's role-based access control with groups so that non-admin users outside those groups cannot create keys. Confirm the setting by signing in as a user outside the permitted group and checking that the key creation control is absent or refused. Done when a test user in an unpermitted group cannot create a key and the admin change is logged in your audit records.
Create one test key for a low-risk script
Choose a read-only or non-sensitive script, such as a health check that lists models, and create a single key for it under a named service owner account. Store the key in your secrets manager, not in the script or a shared document. Restrict the key to the endpoints the policy allows, if your release offers endpoint limits, and note any limit you could not confirm. Done when the key exists, is stored in the secrets manager and its owner and purpose are recorded in the key register.
Verify allowed and denied calls
Run the test script with the new key and confirm a successful call to an allowed endpoint. Then send the same key to an endpoint outside the policy and confirm it is refused. Finally, call the API with a key belonging to a non-permitted account and confirm that account cannot reach the protected endpoints. Keep the request and response results as evidence. Done when the allowed call succeeds, both denied calls fail, and the results are saved with the policy record.
Confirm revocation of a test key
Revoke the test key from the admin or user settings, then repeat the script call and confirm it is rejected. Check that the revocation appears in your logs where your logging setup records it. In a multi-replica deployment, repeat the check against more than one replica to confirm the revocation is shared. Done when the revoked key fails on every replica tested and the revocation event is traceable.
Record key owners and schedule a review
Enter every approved key in the register with its owner, purpose, allowed endpoints, creation date and the date of the next review. Assign a review cadence set by your security policy and add a reminder in your ticketing system. Confirm that a departing employee's keys are included in your offboarding checklist. Done when every active key has an owner and a review date, and someone outside the platform team has checked the register.
Retest the policy after each upgrade
After any Open WebUI upgrade, rerun the allowed call, the denied calls and the revocation check against the upgraded instance before users are told the platform is ready. Compare the admin settings with the policy table, since defaults and option names can change between releases, and read the release notes for changes to API keys or license terms. Done when the retest passes on the new version, any drift from the policy is corrected or accepted in writing, and the register shows the retest date.
How an API call with a key reaches Open WebUI
The request starts in the script's network and passes through a reverse proxy before it reaches Open WebUI. Open WebUI checks the key and its permissions before it forwards the call to the model provider you configured. Administrators use a separate path to list and revoke keys, so the admin session never has to be shared with scripts. Check that the proxy does not strip the authorization header, that each key has only the endpoints it needs, and that the provider connection is the one you approved.
Request path for a script's API key, with the admin path for managing keys.
Key patterns for personal scripts, services and shared tools
A personal script is a key a developer creates for their own automation, such as a notebook that bulk-uploads documents or a shell helper that lists models. The key acts with that developer's permissions, so its risk is tied to one person's access. Confirm in your version whether non-admin users can create keys at all, and whether an administrator can restrict that to certain groups.
- Owner model: the individual who created the key is the owner, and the key should be recorded with a named team contact in case that person leaves.
- Expected access: keep the key to the endpoints the script actually calls, and avoid reusing a key that has admin-level reach.
- Rotation habit: replace the key on a fixed schedule your policy sets, and whenever the developer changes roles or the script is retired.
- Revocation plan: revoke the key as soon as the script is removed, the laptop is lost or the developer leaves, and confirm the revocation took effect with a failed test call.
- Storage: keep the key in a password manager or secrets store, never in a repository or shared chat.
Before you allow personal keys broadly, confirm in your Open WebUI version which settings control key creation and endpoint restriction.
A service integration is a key used by a scheduled job, a CI/CD pipeline or a backend connector that runs without a person present. These keys tend to outlive the staff who set them up, so ownership must sit with a team, not an individual. Confirm in your version how keys are attributed and whether the account behind a key can be disabled without affecting the user's other sessions.
- Owner model: assign a named team, with a documented on-call or queue, as the owner, and record who approved the key.
- Expected access: limit the key to the specific endpoints the job calls, and test that it is refused everywhere else.
- Rotation habit: rotate on a schedule, and schedule the replacement so the old and new keys overlap briefly during cutover.
- Revocation plan: document who can revoke the key, how the pipeline is told to stop using it and how the job's failure is detected.
- Storage: inject the key from your pipeline's secret store at run time, and keep it out of job logs.
Review each service key when the owning team changes, since a key with no current owner is a common source of stale access.
A shared internal tool, such as a team dashboard or an internal chatbot front end, calls Open WebUI on behalf of many users. The key's blast radius covers everyone who uses the tool, so it should not carry any one person's full permissions. Confirm in your version whether requests from the tool are attributed to a service account or to the individual who configured it, because that affects audit trails.
- Owner model: a platform or application team owns the tool and its key, with a backup owner named in the runbook.
- Expected access: grant only the models and endpoints the tool needs, and keep administrative endpoints out of its scope.
- Rotation habit: rotate on a set schedule and after any change to the tool's hosting, team members or code repository access.
- Revocation plan: keep a tested procedure to disable the key quickly, and plan how users will be told that the tool is down during the switch.
- Logging: review which user actions the tool triggers, so that a misuse investigation can trace back to the tool and its callers.
Before launch, confirm with your security team how the tool's key is stored and who can read its configuration.
Revoking a leaked Open WebUI API key without breaking other integrations
Start by finding out whose key leaked and which integrations depend on it, because the order of the response depends on that answer. Record the key's owner, the scripts, pipelines and tools that send requests with it, and the endpoints each one calls. If several integrations share a single key, a leak is no longer one exposure: revoking that key stops every integration that uses it at the same moment. Treat a shared key as the main risk to fix in this section, and plan to split it into one key per integration before the next rotation. Confirm the key owner in your own admin records, since the deployment does not tell you which integration a key was meant for.
Revoke or disable the leaked key first, then confirm the revocation has taken effect. Check the replica behavior before you rely on it: in a multi-replica deployment, confirm with your own test that a revoked key is rejected by every replica, not only the one that handled the revocation. Sessions and cached state are shared through Redis in a scaled setup, so verify this on your version rather than assuming it. Then review the access or audit logs for calls made with the leaked key. Confirm in your own environment whether the logs record which key made each call, and whether they include the endpoint, timestamp and source address. If they do not, you cannot prove which requests were made with the key, and the scope of the review widens.
Issue a replacement key for each affected integration, scoped to the endpoints that integration needs, and deliver it through your secrets manager instead of chat or email. Then update the scripts through a planned change: list each consumer, schedule the cutover window with its owner, and test the new key against a staging copy before production. Keep the old key revoked throughout, so any integration that still calls with it fails visibly and can be found. Close the review by recording the owner, the cause of the leak and the new per-integration key layout, so the next rotation does not repeat the same single point of failure.
Security controls for Open WebUI API keys
Each API key is a standing credential that reaches the same models, chats and settings as the account that created it. The cards below pair each main risk with the control to apply and the check that shows the control works, so a key stays narrow, short-lived, traceable and removable.
Keys pasted into code and logs
A key written into a script, notebook, CI variable or shell history becomes readable by anyone with repository or log access. Store keys in your organization's secret manager and inject them as environment variables at runtime, never as literals in source files. Check your repositories with a secret scanner, confirm that CI logs mask the variable, and confirm that reverse proxy and application logs do not record the Authorization header.
Over-broad keys reaching admin functions
A key created by an administrator carries that administrator's reach, so a script that only needs chat completions could also change settings or manage users. Create keys from accounts with the least privilege that the integration needs, and document which endpoints each key is meant to call. Verify by sending requests with the key to admin-only routes and confirming they are refused.
Keys that never expire
A key with no expiry stays valid after the script that used it is retired, the employee who created it leaves, or the machine that held it is reimaged. Set a rotation schedule for every key and record an owner and a purpose alongside it. Confirm in your own deployment whether keys can carry an expiry date, and if they cannot, treat periodic manual revocation as a required step in your runbook.
Creation by users outside approved groups
If any signed-in user can mint API keys, keys spread into personal tools and shared channels that no one reviews. Limit key creation to the groups your access model approves, and manage that permission through group membership rather than individual grants. Verify by signing in as a user outside those groups and confirming the key creation option is unavailable or refused.
Open WebUI featuresMissing audit trails
When a key is misused, you need to know which key made the request, when it was created, and who owned it. Confirm which events your deployment records for key creation, use and deletion, and send application and proxy logs to a central store with retention that matches your policy. Test the trail by creating a throwaway key, using it once, revoking it, and checking that all three events can be traced to one identity.
Keys sent over unproxied connections
An API key sent over plain HTTP can be captured by anyone on the network path, including on internal networks. Terminate TLS at a reverse proxy in front of Open WebUI, redirect HTTP to HTTPS, and block direct access to the application port from clients. Verify with a scan or request from a client outside the proxy path that plain HTTP does not return a working API response and that the certificate chain validates.
Scaling Open WebUI docsQuestions buyers ask about Open WebUI API key management
What does outside help for Open WebUI API key management cost?
No price is published, and a quote follows from a written scope. The main cost drivers are the number of integrations that will call the API, how many endpoints each key class must reach, whether key activity must flow into your log platform, whether the deployment runs as several replicas, and how much documentation your teams need afterward. Each of these adds design, configuration and testing work. Ask for a fixed-scope quote that lists each integration, the endpoints it touches, the logging destination, the replica count and each deliverable, with one-time work separated from any recurring retainer for upgrades or continuous testing.
How long does an API key policy and rollout usually take?
Duration depends on the same drivers as cost: how many integrations need keys, how many endpoints they must reach, and whether non-admin users will create their own keys. A single team with a few scripts is a much smaller job than a company-wide rollout with group-based rules and log forwarding. Ask the provider to state the phases, the decision points that need your sign-off, and the dates on which each deliverable is due. Timelines belong in the written scope, not in a verbal estimate.
What does our internal team have to provide during the engagement?
Expect to supply named owners for the identity provider, the reverse proxy, the logging platform and each integration that will hold a key. Your team should also decide who may create keys, which endpoints each script actually needs, and how long keys may live. Make these inputs a checklist in the scope with a named contact and a response expectation for each. Missing decisions are the most common reason rollouts stall, so ask the provider which decisions are needed before build starts.
Can a small team manage Open WebUI API keys without outside help?
A small team on one replica can often configure keys, document a simple rule and revoke a leaked key with its own staff, provided someone reads the release notes for each upgrade and tests changes before they reach production. Outside help makes more sense when you need endpoint-level restrictions for many integrations, log forwarding to a central platform, a multi-replica setup with shared state, or a written procedure your auditors can follow. Ask the provider which tasks it would hand over to you and which it would keep, and request that handover in writing.
How do API keys interact with SSO and MFA?
API keys are a separate credential from the browser session, so a user signing in through SSO or MFA does not by itself control what a script can do with a key. Decide which accounts are allowed to create keys, and make sure revoking a user at the identity provider also stops their access to the Open WebUI account that owns the key. Check this path in testing rather than assuming it. Ask the provider to show, in the scope, how key creation is gated, how a disabled user is handled and which identity events are logged.
What should we check before a leaked API key is revoked?
Revocation should follow a runbook that names who can revoke a key, how the owning account is identified, which integrations will fail when the key stops working, and where the activity log is kept for review. Multi-replica deployments need the revocation to reach every instance, which depends on the shared state layer being configured correctly. Ask for a tested revocation procedure, a retest after any change, and a record of the logs that show what the leaked key did before it was disabled.
Does a written API key policy help with compliance reviews?
A written policy, a tested configuration and retained evidence give assessors something concrete to examine, but they do not make a deployment compliant by themselves. DeployOpen prepares systems, controls and evidence for compliance assessments, and independent auditors and certification bodies issue the actual conclusions. Ask the provider which control areas the evidence covers, how it is stored, and which parts of your assessment remain your responsibility.
What to confirm about API keys in your environment
The policy in this guide depends on behavior that varies by release and by how your deployment is run. Each card below is a question to answer with the vendor documentation or a test in a staging copy of your own setup before you write the policy into practice.
Does endpoint restriction exist?
Confirm whether the release you run can limit an API key to specific endpoints or only to a broad role. If it cannot, a key inherits the permissions of the user who created it, and your script access is as wide as that user's. Test by creating a key, calling an endpoint outside your intended list, and recording whether the request succeeds. Do not assume endpoint scoping exists because a feature page mentions API keys.
Open WebUI featuresCan key creation be limited to groups?
Confirm whether non-admin users can be allowed to create keys while the setting is restricted to chosen groups, or whether it is a single global switch. Check this with a test user who belongs to a group that should not have the permission and one that should. Record who can see and create keys, and whether a user can read keys created by someone else.
How keys behave across replicas
Confirm that a key created on one instance is accepted by every replica behind your load balancer, and that it still works after a container restart or a rolling upgrade. Keys stored only in local state will fail intermittently. Run the same request several times through the load balancer after restarting one replica, and check your database and Redis configuration against the scaling guide before go-live.
Scaling guideIs key use visible in logs?
Confirm whether each API request records which key was used, the user it belongs to, the endpoint called and the time. Without that record, a leaked key can be used for weeks without anyone noticing. Send a test request with a known key, then search your proxy and application logs for it. If the key identifier does not appear, plan logging at the reverse proxy and confirm your retention period.
How the license terms apply
Confirm with your legal or procurement team whether your deployment will exceed 50 users in any rolling 30-day period. Above that threshold, the Open WebUI License requires that branding stay unaltered unless you hold an enterprise license or written contributor permission. Key management itself is not licensed differently, but the branding decision affects how you present the tool to users who will request keys.
Open WebUI LicenseWhich release you run
Confirm which release your instance runs and check its release notes for changes to API key handling, since scoping and permissions can change between versions. Pin the version you tested and repeat the endpoint, group and revocation checks after each upgrade. Keep a written record of the test results so the next upgrade review starts from evidence rather than memory.
- Latest supplied release
- v0.12.3
How DeployOpen scopes and delivers Open WebUI API key management
DeployOpen approaches API key management for Open WebUI as a written, fixed-scope piece of work inside your own infrastructure. We agree which key types, endpoints and user groups are in scope, build the policy and configuration, test it against your access model, and hand over the runbooks your team needs to operate it.
How we scope
- Confirm which users and groups may create their own keys and which need an administrator to issue them.
- Map each planned script or integration to the specific endpoints and models it needs before any key is enabled.
- Agree in writing how key lifetimes, revocation steps and audit log requirements will be handled before work starts.
How we build
- Configure API key access in your Open WebUI deployment, including the admin settings that control who can create keys.
- Set up endpoint restrictions and test that each key is refused on routes outside its approved list.
- Verify that a revoked key stops working and that session state behaves correctly on your chosen Redis and database setup.
How we hand over
- Deliver a written key issuance and revocation procedure that names the owner for each step.
- Document the configuration, the endpoint allow lists and the test cases used to confirm them.
- Walk your platform and security teams through the runbook so they can rotate or revoke a leaked key without us.
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
- Ongoing support, upgrades and continuous testing are available as a retainer after handover.
- Ask us to confirm how a retainer would cover reviews of new Open WebUI releases before you upgrade.

