429s through API Management in front of Azure OpenAI, but not when calling the deployment directly

Aria Rahujani 20 Reputation points
2026-10-22T08:58:11.41+00:00

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-After delay.
  • 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-limit or rate-limit-by-key element.

Questions:

  1. 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?
  2. 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.
  3. 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-After delay.
    • 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-limit or rate-limit-by-key element.
    Questions:
    1. 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?
    2. 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.
    3. 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

An Azure service that provides a hybrid, multi-cloud management platform for APIs.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.