Load Balancing
Balance the load of your requests between the same from different providers.
The Keywords AI API will automatically balance the request load across the same model provided by different providers. This is achieved by hitting different provider endpoints based on their rate limit and their average latency across the day.
Keywords AI will ping the providers every hour to measure the average latency across the day. And update the latency data for the providers in the backend for this load-balancing calculation.
Under the hood, here is the pseudo-code of how the load balancing works: