feat: Option to auto-start chat via /api/v1/chats/new #4471

Closed
opened 2025-11-11 15:54:56 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @rkuemon on GitHub (Mar 17, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

I want to build a service that automatically creates and starts a new chat in OpenWebUI through the API. Currently, the /api/v1/chats endpoint allows initializing messages within a new chat, but it doesn't actually trigger the chat to start. From what I've seen, you have to send an additional request to /api/chat/completion, but that endpoint requires a "session_id" and another "id," which I've only found accessible via WebSockets. Unfortunately, accessing these would require me to log in using my username and password for the auth token, defeating the whole purpose of using the API.

Desired Solution you'd like

I'd like an option in the /api/v1/chats/new endpoint to automatically start a chat in one step via the API. If anyone knows of an alternative way for me to achieve my goal, I'd appreciate it a lot. :)

Alternatives Considered

No response

Additional Context

No response

Originally created by @rkuemon on GitHub (Mar 17, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description I want to build a service that automatically creates and starts a new chat in OpenWebUI through the API. Currently, the `/api/v1/chats` endpoint allows initializing messages within a new chat, but it doesn't actually trigger the chat to start. From what I've seen, you have to send an additional request to `/api/chat/completion`, but that endpoint requires a "session_id" and another "id," which I've only found accessible via WebSockets. Unfortunately, accessing these would require me to log in using my username and password for the auth token, defeating the whole purpose of using the API. ### Desired Solution you'd like I'd like an option in the `/api/v1/chats/new` endpoint to automatically start a chat in one step via the API. If anyone knows of an alternative way for me to achieve my goal, I'd appreciate it a lot. :) ### Alternatives Considered _No response_ ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#4471