Skip to main content
The Azure OpenAI Batch API efficiently handles large-scale and high-volume processing tasks. It processes asynchronous groups of requests with separate quota and offers a 24-hour target turnaround at 50% less cost than global standard. With batch processing, you send a large number of requests in a single file instead of sending one request at a time. Global batch requests have a separate enqueued token quota, so your online workloads aren’t disrupted. Key use cases include:
  • Large-Scale Data Processing: Quickly analyze extensive datasets in parallel.
  • Content Generation: Create large volumes of text, such as product descriptions or articles.
  • Document Review and Summarization: Automate the review and summarization of lengthy documents.
  • Customer Support Automation: Handle numerous queries simultaneously for faster responses.
  • Data Extraction and Analysis: Extract and analyze information from vast amounts of unstructured data.
  • Natural Language Processing (NLP) Tasks: Perform tasks like sentiment analysis or translation on large datasets.
  • Marketing and Personalization: Generate personalized content and recommendations at scale.
If your batch jobs are so large that you hit the enqueued token limit even after maxing out the quota for your deployment, certain regions now support a new feature that allows you to queue multiple batch jobs with exponential backoff.Once your enqueued token quota is available, the next batch job can be created and kicked off automatically. To learn more, see automating retries of large batch jobs with exponential backoff.
The service aims to process batch requests within 24 hours, but it doesn’t expire jobs that take longer. You can cancel the job anytime. When you cancel the job, the service cancels any remaining work and returns any already completed work. You pay for any completed work.Data stored at rest remains in the designated Azure geography, while data might be processed for inferencing in any Azure OpenAI location. Learn more about data residency.

Batch support

Global batch model availability

While Global Batch supports older API versions, some models require newer API versions. For example, o3-mini isn’t supported with 2024-10-21 since it was released after this date. To access newer models with Global Batch, use the v1 API.

Feature support

The following features aren’t currently supported:
  • Integration with the Assistants API.
  • Integration with Azure OpenAI On Your Data feature.

Batch deployment

In the Microsoft Foundry portal, the batch deployment types appear as Global-Batch and Data Zone Batch. To learn more about Azure OpenAI deployment types, see the deployment types guide.
We recommend enabling dynamic quota for all global batch model deployments to help avoid job failures due to insufficient enqueued token quota. Using dynamic quota allows your deployment to opportunistically take advantage of more quota when extra capacity is available. When dynamic quota is set to off, your deployment will only be able to process requests up to the enqueued token limit that was defined when you created the deployment.

Batch limits

Batch file limits don’t apply to output files (for example, result.jsonl, and error.jsonl). To remove batch input file limits, use Batch with Azure Blob Storage.

Batch quota

The table shows the batch quota limit. Quota values for global batch are represented in terms of enqueued tokens. When you submit a file for batch processing, the number of tokens in the file is counted. Until the batch job reaches a terminal state, those tokens count against your total enqueued token limit.

Global batch

B = billion | M = million | K = thousand

Data zone batch

Batch object

Frequently asked questions (FAQ)

Can images be used with the batch API?

This capability is limited to certain multimodal models. You can provide images as input either through an image URL or a base64 encoded representation of the image.

Can I use the batch API with fine-tuned models?

The batch API doesn’t currently support fine-tuned models.

Can I use the batch API for embeddings models?

The batch API doesn’t currently support fine-tuned models.

Does content filtering work with Global Batch deployment?

Yes. Similar to other deployment types, you can create content filters and associate them with the Global Batch deployment type.

Can I request additional quota?

Yes, from the quota page in the Foundry portal. Default quota allocation can be found in the quota and limits article.

What happens if the API doesn’t complete my request within the 24 hour time frame?

We aim to process these requests within 24 hours; we don’t expire the jobs that take longer. You can cancel the job anytime. When you cancel the job, any remaining work is canceled and any already completed work is returned. You’ll be charged for any completed work.

How many requests can I queue using batch?

There’s no fixed limit on the number of requests you can batch, however, it will depend on your enqueued token quota. Your enqueued token quota includes the maximum number of input tokens you can enqueue at one time. Once your batch request is completed, your batch rate limit is reset, as your input tokens are cleared. The limit depends on the number of global requests in the queue. If the Batch API queue processes your batches quickly, your batch rate limit is reset more quickly.

Troubleshooting

A job is successful when status is completed. Successful jobs will still generate an error_file_id, but it will be associated with an empty file with zero bytes. When a job failure occurs, you’ll find details about the failure in the errors property:

Error codes

Known issues

  • Resources deployed with Azure CLI won’t work out-of-box with Azure OpenAI global batch. This is due to an issue where resources deployed using this method have endpoint subdomains that don’t follow the https://your-resource-name.openai.azure.com pattern. A workaround for this issue is to deploy a new Azure OpenAI resource using one of the other common deployment methods which will properly handle the subdomain setup as part of the deployment process.
  • UTF-8-BOM encoded jsonl files aren’t supported. JSON lines files should be encoded using UTF-8. Use of Byte-Order-Mark (BOM) encoded files isn’t officially supported by the JSON RFC spec, and Azure OpenAI will currently treat BOM encoded files as invalid. A UTF-8-BOM encoded file will currently return the generic error message: “Validation failed: A valid model deployment name couldn’t be extracted from the input file. Please ensure that each row in the input file has a valid deployment name specified in the ‘model’ field, and that the deployment name is consistent across all rows.”
  • When using your own storage for batch input data, once the batch job is submitted, if the input blob is modified the scoring job will be failed by the service.

See also