Size an API request payload and check it against gateway limits.
Batch size is bounded by the gateway limit less the envelope, so the safe maximum is a division rather than a guess. Compression raises the effective item count proportionally. Choosing a batch size just under the limit maximises throughput per request while avoiding the rejections that come from hitting the cap.
API Payload Size
Payload = items × bytes per item + envelope; batch size = (limit − envelope) ÷ bytes per item
Payload = items × bytes per item + envelope; batch size = (limit − envelope) ÷ bytes per item Batch size is bounded by the gateway limit less the envelope, so the safe maximum is a division rather than a guess. Compression raises the effective item count proportionally.
Choosing a batch size just under the limit maximises throughput per request while avoiding the rejections that come from hitting the cap.
This calculator takes 5 inputs: Items in the request, Bytes per item, Envelope and metadata size, Gateway payload limit, Request compression saving. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.