Real Time Models Quickstart
In this example, we’ll be using our most popular optimized ultra fast latent consistency model.
All our Model Endpoint’s support HTTP/REST. Additionally our real-time models support WebSockets. You can use the HTTP/REST endpoint for any real time model but if you are sending back to back requests using websockets gives the best results.
Run SDXL at the speed of light
Run SDXL at the speed of light
Before we proceed, you need to create your API key.
You can read more about the real time clients in our real time client docs section.
To get the best performance from this model:
- Make sure the image is provided as a base64 encoded data url.
- Make sure the image_url is exactly 512x512.
- Make sure sync*mode is true, this will make sure you also get a base64 encoded data url back from our API.
You can also use 768x768 or 1024x1024 as your image dimensions, the inference will be faster for this configuration compared to random dimensions but wont be as fast as 512x512.
Video Tutorial: Latent Consistency - Build a Real-Time AI Image App with WebSockets, Next.js, and fal.ai by Nader Dabit