# Is there a way to reach Verba Chat without the UI, through an API or a request for example

**URL:** <https://forum.weaviate.io/t/is-there-a-way-to-reach-verba-chat-without-the-ui-through-an-api-or-a-request-for-example/2694>\
**Category:** Support\
**Created:** [June 13, 2024, 4:26am UTC](https://forum.weaviate.io/t/is-there-a-way-to-reach-verba-chat-without-the-ui-through-an-api-or-a-request-for-example/2694 "2024-06-13T04:26:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arturo\_Zambrano](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/arturo_zambrano/32/1735_2.png) [@Arturo\_Zambrano](https://forum.weaviate.io/u/Arturo_Zambrano)\
**Post date:** [June 13, 2024, 4:26am UTC](https://forum.weaviate.io/t/is-there-a-way-to-reach-verba-chat-without-the-ui-through-an-api-or-a-request-for-example/2694/1 "2024-06-13T04:26:05Z")

</div>

Is there a way to reach Verba Chat without the UI, through an API or a request for example.

I have a main app, an currently using Ollama runs in my local, and right now I have a little node application that functions like a RAG, I’m embedding the queries that I get, comparing the vectors and then giving to ollama the context and original query to get the answer.

Is there a way to introduce Verba here? The UI is really nice, but for the workflow I need an endpoint, is this possible currently?

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [June 14, 2024, 2:32pm UTC](https://forum.weaviate.io/t/is-there-a-way-to-reach-verba-chat-without-the-ui-through-an-api-or-a-request-for-example/2694/2 "2024-06-14T14:32:06Z")

</div>

Hi @Arturo_Zambrano !! Welcome to our community!

Verba UI consume two apis (tested on [http://verba.weaviate.io](http://verba.weaviate.io)) when doing a query

[https://verba.weaviate.io/api/query](https://verba.weaviate.io/api/query)

and a websocket at:  
wss://verba.weaviate.io/ws/generate\_stream

With those you can use probably use it’s backend directly.

However, I don’t believe those are documented or intended to be used outside of that UI.

Additionally, you can always code some api that will connect to Weaviate directly.

I have not found a feature request on this:

> **[Issues · weaviate/Verba](https://github.com/weaviate/Verba/issues)**
>
> Retrieval Augmented Generation (RAG) chatbot powered by Weaviate - Issues · weaviate/Verba

It would be interesting to open one, as this may also be a popular demand from other users.

Let me know if this helps.

Thanks!

---

<div class="post-metadata">

**Author:** ![Kieran\_Sears](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/kieran_sears/32/2766_2.png) [@Kieran\_Sears](https://forum.weaviate.io/u/Kieran_Sears)\
**Post date:** [March 31, 2025, 10:36am UTC](https://forum.weaviate.io/t/is-there-a-way-to-reach-verba-chat-without-the-ui-through-an-api-or-a-request-for-example/2694/3 "2025-03-31T10:36:52Z")

</div>

I’ve been hacking on the same thing, I pieced a good bit together by going on the chrome developer console while running the default verba chat UI and watching the network tab (there’s an option to copy requests as cURL which is mucho helpful).

Connecting first requires credentials, these can simply be hardcoded for development but will require making secure by having an actual key later and setting `AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED` to false:

```auto
{
    "url": "http://weaviate:8080",
    "key": "",
    "deployment": "Docker"
}

```

I have my verba / weaviate running in a docker compose, hence why my domain is weaviate, I could also have it as localhost I believe as I’m exposing the port in my compose config, but I’ve not tested that and this works just fine for me at the moment.

```auto
services:
  verba:
    build:
      context: .
      dockerfile: ./external/verba/Dockerfile 
    ports:
      - 8000:8000
    environment:
      - WEAVIATE_URL_VERBA=http://weaviate:5433
      - OPENAI_API_KEY=$OPENAI_API_KEY
      - COHERE_API_KEY=$COHERE_API_KEY
      - OLLAMA_URL=http://host.docker.internal:11434
      - OLLAMA_MODEL=$OLLAMA_MODEL
      - OLLAMA_EMBED_MODEL=$OLLAMA_EMBED_MODEL
      - UNSTRUCTURED_API_KEY=$UNSTRUCTURED_API_KEY
      - UNSTRUCTURED_API_URL=$UNSTRUCTURED_API_URL
      - GITHUB_TOKEN=$GITHUB_TOKEN
    volumes:
      - verba_data:/data/
    depends_on:
      weaviate:
        condition: service_healthy
    healthcheck:
      test: wget --no-verbose --tries=3 --spider http://localhost:8000 || exit 1
      interval: 5s
      timeout: 10s
      retries: 5
      start_period: 10s

  weaviate:
    command:
      - --host
      - 0.0.0.0
      - --port
      - '8080'
      - --scheme
      - http
    image: semitechnologies/weaviate:1.25.10
    ports:
      - 5433:8080
      - 8001:8080
    volumes:
      - weaviate_data:/var/lib/weaviate
    restart: on-failure:0
    healthcheck:
      test: wget --no-verbose --tries=3 --spider http://localhost:8080/v1/.well-known/ready || exit 1
      interval: 5s
      timeout: 10s
      retries: 5
      start_period: 10s
    environment:
      OPENAI_APIKEY: $OPENAI_API_KEY
      COHERE_APIKEY: $COHERE_API_KEY
      QUERY_DEFAULTS_LIMIT: 25
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
      PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
      ENABLE_MODULES: 'e'
      CLUSTER_HOSTNAME: 'node1'

```

(your dockerfile location will differ or you could just use the default `image: semitechnologies/verba`, but I like hacking with the server/frontend code to debug so…)

As @DudaNogueira points out there’s a websocket you listen to responses through (wss://verba.weaviate.io/ws/generate\_stream, or more likely if you run it as a docker container ws://localhost:8000/ws/generate\_stream) that you’ll want to connect to first.

Then sending, say a query request, requires that you first hit the `/api/get_rag_config` endpoint and put it’s response into the query request’s payload under a field named “RAG”. You’ll also need the “origin” header `headers={"Origin": "<<your_client_url>>"}`

I think this should get you started. Maybe I’ll throw a PR together for an API doc generator that can be hosted for others, or develop a client library if there’s a language which is most popular like python. Put in a request in Verba’s Github under “Issues”, if it gains enough popularity then it’s more likely to get worked on!

Hope this all helps and Happy hacking 🙂
