
Why AI is now an infrastructure problem
Part one of AI Infrastructure 101, a seven-part series.
Blog
This follow-up to our “Hello World” tutorial walks through streaming output from a Runpod Serverless endpoint using WebSocket and base64 files.

In this followup to our 'Hello World' tutorial, we'll create a serverless endpoint that processes base64-encoded files and streams back the results. This will demonstrate how you can work with file input/output over our serverless environment by encoding the file as data within a JSON payload.
As before, this tutorial will be aimed at OSX developers.
Create your development environment.
Create a new file called handler.py. Remember that the handler loop is how code gets executed when a worker is active. In this example, this handler will simulate image processing. Since this tutorial is to demonstrate the serverless environment more than process images, we will have it just create a static, blank image as the payload.
As with the previous tutorial, we'll need to provide the Dockerfile and requirements.txt to build and push the image.
As before, build and push your image to DockerHub, and then pull it into your endpoint.

Here, we'll provide an example of how to interact with the endpoint in code. You'll need to provide your Runpod API key and Endpoint ID in the variables up top. Let's call this test_endpoint.py.
What this code will do is send a request to the endpoint you've created, let it process and return base64 data in a JSON payload, and return it to your script for further local processing and saving.
Run the test:
You should see output like this, along with a base64 JSON payload saved in the folder you ran the script in.
You've now learned how to create a Runpod serverless endpoint that can process base64-encoded files and stream results back to the client. This pattern can be extended to handle various types of file processing tasks while providing real-time feedback to users.
Author profile: Brendan McKeag
Blog Posts

Part one of AI Infrastructure 101, a seven-part series.
.jpeg)
The LTX-2.5 weights are out, with day-zero ComfyUI support. Here's what actually changed, and what you need to get generating on Runpod today.

A practical guide for accurately calculating the VRAM requirements for full-parameter model fine-tuning, explaining why standard inference-based rules of thumb are insufficient and offering equations to help users properly size their compute resources.