Skip to Content
Gateway

Load balancers

Share a model's traffic across models, or across your own provider keys, by weight.

A load balancer splits a model’s requests across several models by weight. Your app keeps sending the same model. Use it to move part of your traffic to a model you’re evaluating, or to spread load across models.

Create a load balancer

Open the Routing tab of the Gateway page , click New route, and choose Load balancer. Pick the model, add the models to share its traffic under Balance between, give each a weight, and save. The model can be a name or an expression such as gpt-*, as for fallbacks. Only project admins can change routes.

A load balancer on gpt-5.4 that sends 75% of requests to gpt-5.4 and 25% to claude-sonnet-4-5
RuleDetail
ShareEach model’s share is its weight divided by the total. With weights 3 and 1, about 75% and 25%.
Weight 0The model never runs. At least one weight must be above 0.
On failureIf the picked model fails, the gateway picks again from the rest, by weight, until one answers.

To compare the models afterwards, group Logs by model.

Your own keys

When you add several keys for one provider, each key is a deployment, and the gateway picks one per request by its Load balance weight. Set it under API keys › BYOK › your provider › the deployment. The default weight is 1; turn off Active or set 0 to stop sending it traffic. If the picked key fails, the gateway tries the provider’s other keys before moving on.