Worked example: 60 RPM and 150,000 TPM header sample
The default scenario uses 60 RPM and 150,000 TPM. Each task reserves 1,800 input tokens plus 700 max output tokens, so each task reserves 2,500 tokens.
At batch size 1, RPM allows 60 tasks/min. TPM allows floor(150,000 / 2,500) = 60 tasks/min. The raw limit is therefore 60 tasks/min.
With a 20% safety buffer, safe API throughput is 60 x 0.80 = 48 tasks/min. Eight workers at 8 seconds average latency can process 8 x 60 / 8 = 60 requests/min, or 60 tasks/min at batch size 1.
The target is 40 tasks/min with 5% retry overhead, so adjusted demand is 42 tasks/min and 42 x 2,500 = 105,000 TPM. That uses 70% of RPM and 70% of TPM, which fits under the 48 tasks/min buffered throughput.
How the API throughput planner works
The planner compares three ceilings: tasks allowed by RPM, tasks allowed by TPM, and tasks your worker pool can process at the selected latency. It then applies a safety buffer to provider limits and inflates the target by retry overhead.
RPM capacity equals requests per minute times batch size. TPM capacity equals tokens per minute divided by tokens reserved per task. Worker capacity equals concurrency times 60 divided by average latency, then multiplied by batch size.
How to read RPM and TPM from headers
Use response headers or dashboard limits from the provider. For OpenAI-style headers, request and token limits can be separate, and whichever limit is exhausted first throttles the workflow.
When batching improves throughput
Batching helps when RPM is the bottleneck and each task is small enough that TPM still has headroom. It can hurt when responses must be immediate, when batch parsing is fragile, or when one failed batch creates too much retry work.
What this estimate excludes
The result excludes daily limits, per-user caps, model-family shared pools, image or audio-specific quotas, regional limits, serverless cold starts, queue overhead, provider reset windows, and downstream database or webhook bottlenecks.
What to do next
Log real request tokens, output tokens, latency, retry count, and headers in a staging run. Then rerun the planner with observed p95 latency and a larger safety buffer before opening traffic to users.