An Azure service that provides a hybrid, multi-cloud management platform for APIs.
Your results match a token limit, not a request limit. The smaller 1,600 token job succeeds even at a higher request rate, and the larger 4,700 token job fails at a lower rate. If it were counting requests, the faster one would fail first.
1. Where else a limit can live
The llm-token-limit policy can be scoped at “global, workspace, product, API, operation”, and it can also appear inside a policy fragment. If you imported this API using the Microsoft Foundry wizard, the Manage token consumption tab lets you “optionally enter settings, or accept defaults that define” this policy. So a token limit can exist even if you did not add it manually.
2. Checking the effective policy for the operation
From Set or edit policies: “To view the effective policies at the current scope, select Calculate effective policy in the policy editor.”
Run this at the operation level. It resolves everything inherited above it.
3. Telling an APIM 429 from a backend 429
llm-token-limit runs inbound, so if it blocks, APIM returns 429 without calling the backend. forward-request is one of the policies that produces dependency telemetry. Compare End-to-end transaction details for a 429 and a 200 from the same minute. If the 200 shows a backend dependency and the 429 shows none, APIM generated the 429.
4. Why the gateway is slower than direct calls
The gateway enforces a counter your direct call never touches. The attribute table in the policy reference also notes: “For each key value, a single counter is used for all scopes at which the policy is configured”, so if the counter key is shared with another API or product, that other traffic consumes your token budget.
If step 2 shows no token policy anywhere, post the effective policy output and we can look at the deployment side.
Help make this community better for everyone: if this answer resolved your issue, please accept it or leave an upvote. If not, share more details in a comment so we can continue the discussion and find the right solution.