Azure OpenAI Batch API – token_limit_exceeded error despite splitting batches

Bidur Nepali 20 Reputation points
2025-06-19T08:50:49.0966667+00:00

I’m using Azure OpenAI Batch API with a GPT‑4.1 batch deployment. Each .jsonl file is under 30K tokens, but I still receive:

Also, is there any endpoint to know that if I can request for batch processing or not with respect to the enqueued tokens?

{ "data": [ { "code": "token_limit_exceeded", "message": "The number of enqueued tokens has surpassed the configured limit of 30K for the deployment 'gpt-4.1-batch'. Please either increase the limit or try again once the current jobs have finished.", "line": null, "param": null } ], "object": "list" } 
}
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
4,080 questions
{count} votes

Accepted answer
  1. Pavankumar Purilla 8,335 Reputation points Microsoft External Staff Moderator
    2025-06-20T01:46:30.07+00:00

    Hi Bidur Nepali,

    The token_limit_exceeded error in Azure OpenAI Batch API doesn’t mean that an individual .jsonl file is too large, but rather that the total number of tokens across all enqueued and in‑progress batch jobs has exceeded the configured limit, which is 30,000 tokens for the gpt‑4.1‑batch deployment. Azure applies this limit at the queue level, so even if your files are well under 30K tokens, you’ll still get this error if the combined tokens across jobs exceed that threshold. Currently, there is no dedicated endpoint to check the available batch token quota before submitting jobs. The best practice is to track your batch jobs by listing their status, summing their estimated token usage, and submitting new jobs only when enough capacity is available. Alternatively, you can request a quota increase if your workload needs higher throughput.
    For more information: Azure OpenAI in Azure AI Foundry Models quotas and limits
    Getting started with Azure OpenAI batch deployments

    I hope this information helps. Thank you!


0 additional answers

Sort by: Most helpful

Your answer

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