How to connect API with Search UI

I have an API with Flask, that runs on my localhost. Basically, I have a search box, where I can enter any sentence. Furthermore I have a database with sentences (in my case an excel sheet). Through some neural network, I can find the most similar sentences to the query sentences. On my website, I can then print out the top n most similar sentences.

For this very simple website, I want to implement a pretty userface. I was told, that I can do this with elastic search-ui. Unfortunately, I have no experience with that at all and moreover, I have never done anything similar. So right now I feel a bit lost.

From my understanding, the solution should be simple. I assume, that elastic search-ui has some functionality, that I can for example create a search box, where I can write a sentence. This sentence will then have a specific format (maybe json), which I can then transfer to my API, transform it in a way that I can use it and receive the most similar sentences. Afterwards, I guess I have to transform the results into a specific format again (probably json again) and pass it to the search-ui.

So first of all, is my idea of what I practically have to do correct?
If so, does anyone have help how to do that? I can't believe that this should be so hard, but I get lost in the documentation (https://github.com/elastic/search-ui#about-search-ui-rocket) quite quickly.

Thank you for your help!

As far as I know the Search Ui is designed to work with Elasticsearch and not custom APIs. If you are not using Elasticsearch this may therefore not be of much use to you.