An Azure service that provides a hybrid, multi-cloud management platform for APIs.
429s through API Management in front of Azure OpenAI, but not when calling the deployment directly
Aria Rahujani
20
Reputation points
I’m running a batch job that sends sequential chat-completion requests to a gpt-5.1 deployment, roughly 2 requests per minute at about 4,700 prompt tokens and about 110 completion tokens each.
- Calling the Azure OpenAI endpoint directly: no 429s.
- Calling the same workload through an Azure API Management gateway (API imported for Azure OpenAI, attached to a product, subscription key required): nearly every request returns 429 on the first attempt and succeeds after the
Retry-Afterdelay. - Smaller requests (about 1,600 tokens each, 3 per minute) through the same gateway return no 429s.
What I’ve checked so far:
- The API’s own policy has no
llm-token-limit,azure-openai-token-limit,rate-limitorrate-limit-by-keyelement.
Questions:
- Besides API-level policies, where else can a token or rate limit be applied (product, global, policy fragments, something configured through the AI Foundry gateway integration)? Is there a way to see the effective policy for one operation?
- How can I tell whether a 429 was returned by API Management itself or passed through from the Azure OpenAI backend? Application Insights is enabled on the API.
- If the API Management backend points at the same deployment as my direct endpoint, what could make the gateway’s effective throughput lower?I’m running a batch job that sends sequential chat-completion requests to a gpt-5.1 deployment, roughly 2 requests per minute at about 4,700 prompt tokens and about 110 completion tokens each.
- Calling the Azure OpenAI endpoint directly: no 429s.
- Calling the same workload through an Azure API Management gateway (API imported for Azure OpenAI, attached to a product, subscription key required): nearly every request returns 429 on the first attempt and succeeds after the
Retry-Afterdelay. - Smaller requests (about 1,600 tokens each, 3 per minute) through the same gateway return no 429s.
- The API’s own policy has no
llm-token-limit,azure-openai-token-limit,rate-limitorrate-limit-by-keyelement.
- Besides API-level policies, where else can a token or rate limit be applied (product, global, policy fragments, something configured through the AI Foundry gateway integration)? Is there a way to see the effective policy for one operation?
- How can I tell whether a 429 was returned by API Management itself or passed through from the Azure OpenAI backend? Application Insights is enabled on the API.
- If the API Management backend points at the same deployment as my direct endpoint, what could make the gateway’s effective throughput lower?
Azure API Management
Azure API Management
Sign in to answer