# Klai Streaming Proxy

{% hint style="info" %}
**Note:** This page provides a high-level overview of the streaming workflow. For specific implementation details, please see the following API documentation:

* [Klai Streaming API (Chat)](/reference/apis-and-services/streaming-proxy/bf-streaming-api-chat.md)
* [Klai Streaming API (Assistants)](/reference/apis-and-services/streaming-proxy/bf-streaming-assistants-api.md)
* [Klai Streaming API (LLM Query)](/reference/apis-and-services/streaming-proxy/bf-streaming-api-llm-query.md)
  {% endhint %}

The streaming proxy allows you to stream generative AI directly into a Klai app via messaging.

### Workflow

1. Back end (FMS) generates the prompt and data needed for the LLM API plus the target channel for the results
2. Streaming Proxy forwards request to the LLM
3. LLM Streams results back to proxy
4. Streaming Proxy sends messages to the target channel and calls a named action to handle the results
5. The browser receives the messages and processes results.

**Notes:**

Currently there is not rate throttling on the Proxy as the LLM generation is generally much slower than message rate limits. There can be bottle next when u\[dating the front end UI if there is a lot of post processing though.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.klai.studio/reference/apis-and-services/streaming-proxy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
