[GH-ISSUE #11866] feat: endpoint to open a new chat with some pre-populated text #16383

Closed
opened 2026-04-19 22:19:06 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @computerdane on GitHub (Mar 19, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11866

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

I want to better be able to integrate Open WebUI with other apps.

Desired Solution you'd like

An API endpoint that, when called, will open a new chat for a user that has the first message pre-populated. This would make it so that in other applications, you can add an "Ask with Open WebUI" button that sends some content to a new chat for you.

Alternatives Considered

I considered maybe adding the ability to embed a little micro AI chat into a page, but we all know how much of a mistake web embeds were.

Additional Context

The use case I have in mind is for our company's knowledge base. It would be awesome to be able to send a knowledge base article to a AI chat and ask questions about it.

Originally created by @computerdane on GitHub (Mar 19, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/11866 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description I want to better be able to integrate Open WebUI with other apps. ### Desired Solution you'd like An API endpoint that, when called, will open a new chat for a user that has the first message pre-populated. This would make it so that in other applications, you can add an "Ask with Open WebUI" button that sends some content to a new chat for you. ### Alternatives Considered I considered maybe adding the ability to embed a little micro AI chat into a page, but we all know how much of a mistake web embeds were. ### Additional Context The use case I have in mind is for our company's knowledge base. It would be awesome to be able to send a knowledge base article to a AI chat and ask questions about it.
Author
Owner

@computerdane commented on GitHub (Mar 19, 2025):

I have been looking around the API source for something that could work, and I see that you can create new chats using the API, but there isn't a way to do it using a redirect or GET request. My thinking is that it would need to be a redirect so that the user's browser session can be used to make the new chat. That way, the page with the link to Open WebUI wouldn't need to do authenticated API requests on the user's behalf

<!-- gh-comment-id:2736929036 --> @computerdane commented on GitHub (Mar 19, 2025): I have been looking around the API source for something that could work, and I see that you can create new chats using the API, but there isn't a way to do it using a redirect or GET request. My thinking is that it would need to be a redirect so that the user's browser session can be used to make the new chat. That way, the page with the link to Open WebUI wouldn't need to do authenticated API requests on the user's behalf
Author
Owner

@computerdane commented on GitHub (Mar 19, 2025):

The other idea would be to allow anonymous POSTs to the API that store a temporary message template with an ID, and then redirect the user to a GET request with that ID that then fills in their chat with the template

<!-- gh-comment-id:2736984199 --> @computerdane commented on GitHub (Mar 19, 2025): The other idea would be to allow anonymous POSTs to the API that store a temporary message template with an ID, and then redirect the user to a GET request with that ID that then fills in their chat with the template
Author
Owner

@tjbck commented on GitHub (Mar 19, 2025):

This already exists. https://docs.openwebui.com/features/chat-features/url-params#url-parameter-overview

<!-- gh-comment-id:2737107048 --> @tjbck commented on GitHub (Mar 19, 2025): This already exists. https://docs.openwebui.com/features/chat-features/url-params#url-parameter-overview
Author
Owner

@computerdane commented on GitHub (Mar 19, 2025):

Awesome, sorry I missed that. Thank you!

<!-- gh-comment-id:2737423473 --> @computerdane commented on GitHub (Mar 19, 2025): Awesome, sorry I missed that. Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#16383