I would like to propose an HTTP API to be able to use the Discuss AI programmatically, similar to how one can use ChatGPT's API.
I can imagine this to work in 2 possible ways:
- The first HTTP call sets the URL of the input document (similar to how one clicks "Ask questions about document" in Kagi search results) - this returns a session token. Subsequent HTTP calls include the session token, and a text prompt.
- One shot HTTP calls, with both the URL of the input document, and a prompt. Here the HTTP response could include also a session token in order to continue with another prompt if needed.