Feat: Allow setting API key in user settings #547

Closed
opened 2025-11-11 14:25:22 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @max00346 on GitHub (Mar 27, 2024).

Is your feature request related to a problem? Please describe.
There is no option to set per-user API keys. It would be nice to set individual limits and track costs for the users.

Describe the solution you'd like
An input field in the settings, available to users, to set an API key for the default OpenAI-compatible endpoint.

Describe alternatives you've considered
Using one key for all users (neither comfortable nor secure).

Additional context
I would love to see a solution to this in the future, making this project even more awesome!

Originally created by @max00346 on GitHub (Mar 27, 2024). **Is your feature request related to a problem? Please describe.** There is no option to set per-user API keys. It would be nice to set individual limits and track costs for the users. **Describe the solution you'd like** An input field in the settings, available to users, to set an API key for the default OpenAI-compatible endpoint. **Describe alternatives you've considered** Using one key for all users (neither comfortable nor secure). **Additional context** I would love to see a solution to this in the future, making this project even more awesome!
Author
Owner

@wang0yue commented on GitHub (May 27, 2024):

+1,只有管理能填apiurl和key,用户是免费用的。可以让用户自己填key,用自己的key对话。这样相当于比nextchat多一个上传文件了

@wang0yue commented on GitHub (May 27, 2024): +1,只有管理能填apiurl和key,用户是免费用的。可以让用户自己填key,用自己的key对话。这样相当于比nextchat多一个上传文件了
Author
Owner

@krrishdholakia commented on GitHub (May 28, 2024):

@max00346 wouldn't it be simpler to just allow passing a user_id to the proxy?

@krrishdholakia commented on GitHub (May 28, 2024): @max00346 wouldn't it be simpler to just allow passing a user_id to the proxy?
Author
Owner

@max00346 commented on GitHub (May 28, 2024):

@max00346 wouldn't it be simpler to just allow passing a user_id to the proxy?

yes thanks, that would be even better!

@max00346 commented on GitHub (May 28, 2024): > @max00346 wouldn't it be simpler to just allow passing a user_id to the proxy? yes thanks, that would be even better!
Author
Owner

@krrishdholakia commented on GitHub (May 28, 2024):

cc: @tjbck can you pass the user id to the openai endpoint?

This should help here + in abuse detection.

@krrishdholakia commented on GitHub (May 28, 2024): cc: @tjbck can you pass the user id to the openai endpoint? This should help here + in abuse detection.
Author
Owner

@tjbck commented on GitHub (Jun 22, 2024):

Implemented as manifold pipe function in dev, more examples will be added to our community platform.

image
image
image

function-openai_manifold-export-1719090778471.json

@tjbck commented on GitHub (Jun 22, 2024): Implemented as manifold pipe function in dev, more examples will be added to our community platform. ![image](https://github.com/open-webui/open-webui/assets/25473318/9d0a5d56-2c28-4d7f-8849-669887ab46b0) ![image](https://github.com/open-webui/open-webui/assets/25473318/944d1fc1-7a79-41c4-8c81-29917c77890e) ![image](https://github.com/open-webui/open-webui/assets/25473318/72b24e87-d3bb-40c5-827a-ba98384500df) [function-openai_manifold-export-1719090778471.json](https://github.com/user-attachments/files/15941957/function-openai_manifold-export-1719090778471.json)
Author
Owner

@justinh-rahb commented on GitHub (Jun 23, 2024):

cc: @tjbck can you pass the user id to the openai endpoint?

This should help here + in abuse detection.

There's an example of a moderation filter already in the Discord, we'll be sure to get that on the community site when integration is available. I'll be whipping all the present authors into getting uploaded 💪

@justinh-rahb commented on GitHub (Jun 23, 2024): > cc: @tjbck can you pass the user id to the openai endpoint? > > This should help here + in abuse detection. There's an example of a moderation filter already in the Discord, we'll be sure to get that on the community site when integration is available. I'll be whipping all the present authors into getting uploaded 💪
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#547