What is API Streaming?
API Streaming is a method of transmitting data from a server to a client in real time, as the data becomes available, rather than waiting for the entire response to be prepared before sending it all at once. This lets you start processing information immediately, improving perceived speed and responsiveness. Bubble's native support for streaming API responses means you can receive real-time data updates from your API endpoints.
What use cases is API Streaming helpful for?
Many real-time features can benefit from API Streaming — prime examples include chatbots and live dashboards.
What types of data are supported?
Right now, we support streaming text data. We'll be working on enabling audio and video streaming in the future.
What plans include API Streaming?
API Streaming is available on all app plans.
How do I set up API Streaming?
Refer to our documentation for a detailed guide. Here's a quick overview of the steps:
Set up an API call to the service of your choice
Set the data type as stream
Make sure to add "stream": true or the equivalent parameter to your API call (based on the service you're calling — check their docs)
Select the values you want returned in the stream after initializing the API call
Just like regular JSON API calls, streaming APIs can be used both as a data source and within workflows. Make sure you check our documentation at this step, since Bubble behaves slightly differently on the client side versus the server side.
See the full documentation for more detail.
Is API Streaming secure?
Yes — you don't need to worry about exposing your API key publicly. That said, you should always follow the API security best practices in our documentation.
How does API Streaming affect my workload usage?
Workload consumption from streaming calls is the same as with standard, non-streaming API calls. You can find more information on API workload inputs in our documentation.
How does API Streaming affect CPU / hardware usage for Dedicated instances?
API Streaming shouldn't lead to a significant increase compared to a conventional API call. Streamed workflow actions will have more overhead than data calls, but are still not very resource-intensive.
