[GH-ISSUE #23426] feat: disabling openai compatile endpoints for non in app chat usage #58648

Closed
opened 2026-05-05 23:37:36 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @amirparsadd on GitHub (Apr 5, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23426

Check Existing Issues

  • I have searched for all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.

Verify Feature Scope

  • I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions.

Problem Description

Currently, Open WebUI lacks the ability to track model usage when requests are made directly via the API rather than through the chat interface. We need a way to monitor all model activity to ensure comprehensive usage tracking.

Desired Solution you'd like

It would be highly beneficial to add an option to restrict access to the OpenAI-compatible API, ensuring that models can only be accessed through the Open WebUI interface.

Alternatives Considered

No response

Additional Context

No response

Originally created by @amirparsadd on GitHub (Apr 5, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/23426 ### Check Existing Issues - [x] I have searched for all existing **open AND closed** issues and discussions for similar requests. I have found none that is comparable to my request. ### Verify Feature Scope - [x] I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions. ### Problem Description Currently, Open WebUI lacks the ability to track model usage when requests are made directly via the API rather than through the chat interface. We need a way to monitor all model activity to ensure comprehensive usage tracking. ### Desired Solution you'd like It would be highly beneficial to add an option to restrict access to the OpenAI-compatible API, ensuring that models can only be accessed through the Open WebUI interface. ### Alternatives Considered _No response_ ### Additional Context _No response_
Author
Owner

@TheMasterFX commented on GitHub (Apr 5, 2026):

You can disable the API key in the Admin-Panel under Users => Groups => Default Permissions. Or you can set this for each group. The /api/models will still show the models but output but when using /api/chat/completions you will geht {"detail":"Use of API key is not enabled in the environment."}

<!-- gh-comment-id:4189128960 --> @TheMasterFX commented on GitHub (Apr 5, 2026): You can disable the API key in the Admin-Panel under Users => Groups => Default Permissions. Or you can set this for each group. The /api/models will still show the models but output but when using /api/chat/completions you will geht `{"detail":"Use of API key is not enabled in the environment."}`
Author
Owner

@amirparsadd commented on GitHub (Apr 5, 2026):

You can disable the API key in the Admin-Panel under Users => Groups => Default Permissions. Or you can set this for each group. The /api/models will still show the models but output but when using /api/chat/completions you will geht {"detail":"Use of API key is not enabled in the environment."}

but we need api keys for some other stuff and users can just use their JWT token

<!-- gh-comment-id:4189158404 --> @amirparsadd commented on GitHub (Apr 5, 2026): > You can disable the API key in the Admin-Panel under Users => Groups => Default Permissions. Or you can set this for each group. The /api/models will still show the models but output but when using /api/chat/completions you will geht `{"detail":"Use of API key is not enabled in the environment."}` but we need api keys for some other stuff and users can just use their JWT token
Author
Owner

@TheMasterFX commented on GitHub (Apr 5, 2026):

but we need api keys for some other stuf

That could be managed via Group Permissions (New Group with API Permission)

users can just use their JWT token

Thats true. But only "advanced users" know how to get it ;-)

<!-- gh-comment-id:4189258363 --> @TheMasterFX commented on GitHub (Apr 5, 2026): > but we need api keys for some other stuf That could be managed via Group Permissions (New Group with API Permission) > users can just use their JWT token Thats true. But only "advanced users" know how to get it ;-)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58648