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

Regiongpt-5.1, 2025-11-13gpt-5, 2025-08-07o3, 2025-04-16o4-mini, 2025-04-16gpt-4.1, 2025-04-14gpt-4.1-nano, 2025-04-14gpt-4.1-mini, 2025-04-14o3-mini, 2025-01-31gpt-4o, 2024-05-13gpt-4o, 2024-08-06gpt-4o, 2024-11-20gpt-4o-mini, 2024-07-18
australiaeast
brazilsouth
canadaeast
centralus
eastus
eastus2
francecentral
germanywestcentral
japaneast
koreacentral
northcentralus
norwayeast
polandcentral
southafricanorth
southcentralus
southindia
swedencentral
switzerlandnorth
uksouth
westeurope
westus
westus3
To access gpt-5 and o3, you need to register. For more information, see the reasoning models guide.
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

Limit nameLimit value
Maximum Batch input files - (no expiration)500
Maximum Batch input files - (expiration set)10,000
Maximum input file size200 MB
Maximum input file size - Bring your own storage (BYOS)1 GB
Maximum requests per file100,000
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

ModelEnterprise and MCA-EDefaultMonthly credit card-based subscriptionsMSDN subscriptionsAzure for Students, free trials
gpt-4.15B200M50M90KN/A
gpt-4.1 mini15B1B50M90KN/A
gpt-4.1-nano15B1B50M90KN/A
gpt-4o5B200M50M90KN/A
gpt-4o-mini15B1B50M90KN/A
gpt-4-turbo300M80M40M90KN/A
gpt-4150M30M5M100KN/A
o3-mini15B1B50M90KN/A
o4-mini15B1B50M90KN/A
gpt-55B200M50M90KN/A
gpt-5.15B200M50M90KN/A
B = billion | M = million | K = thousand

Data zone batch

ModelEnterprise and MCA-EDefaultMonthly credit card-based subscriptionsMSDN subscriptionsAzure for Students, free trials
gpt-4.1500M30M30M90KN/A
gpt-4.1-mini1.5B100M50M90KN/A
gpt-4o500M30M30M90KN/A
gpt-4o-mini1.5B100M50M90KN/A
o3-mini1.5B100M50M90KN/A
gpt-55B200M50M90KN/A
gpt-5.15B200M50M90KN/A

Batch object

PropertyTypeDefinition
idstringThe identifier of the batch.
objectstringbatch
endpointstringThe API endpoint used by the batch.
errorsobjectError information for the batch, if any.
input_file_idstringThe ID of the input file for the batch.
completion_windowstringThe time frame within which the batch should be processed.
statusstringThe current status of the batch. Possible values: validating, failed, in_progress, finalizing, completed, expired, cancelling, cancelled.
output_file_idstringThe ID of the file containing the outputs of successfully executed requests.
error_file_idstringThe ID of the file containing the outputs of requests with errors.
created_atintegerA timestamp when this batch was created (in Unix epoch seconds).
in_progress_atintegerA timestamp when this batch started progressing (in Unix epoch seconds).
expires_atintegerA timestamp when this batch will expire (in Unix epoch seconds).
finalizing_atintegerA timestamp when this batch started finalizing (in Unix epoch seconds).
completed_atintegerA timestamp when this batch completed (in Unix epoch seconds).
failed_atintegerA timestamp when this batch failed (in Unix epoch seconds).
expired_atintegerA timestamp when this batch expired (in Unix epoch seconds).
cancelling_atintegerA timestamp when this batch started cancelling (in Unix epoch seconds).
cancelled_atintegerA timestamp when this batch was cancelled (in Unix epoch seconds).
request_countsobjectObject structure:

total integer
The total number of requests in the batch.
completed integer
The number of requests in the batch that are completed successfully.
failed integer
The number of requests in the batch that failed.
metadatamapA set of key-value pairs that you can attach to the batch. This property can be useful for storing additional information about the batch in a structured format.

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:
{
  "value": [
    {
      "id": "batch_80f5ad38-e05b-49bf-b2d6-a799db8466da",
      "completion_window": "24h",
      "created_at": 1725419394,
      "endpoint": "/chat/completions",
      "input_file_id": "file-c2d9a7881c8a466285e6f76f6321a681",
      "object": "batch",
      "status": "failed",
      "cancelled_at": null,
      "cancelling_at": null,
      "completed_at": 1725419955,
      "error_file_id": "file-3b0f9beb-11ce-4796-bc31-d54e675f28fb",
      "errors": {
        "object": "list",
        "data": [
          {
            "code": "empty_file",
            "message": "The input file is empty. Please ensure that the batch contains at least one request."
          }
        ]
      },
      "expired_at": null,
      "expires_at": 1725505794,
      "failed_at": null,
      "finalizing_at": 1725419710,
      "in_progress_at": 1725419572,
      "metadata": null,
      "output_file_id": "file-ef12af98-dbbc-4d27-8309-2df57feed572",
      "request_counts": {
        "total": 10,
        "completed": null,
        "failed": null
      }
    }
  ]
}

Error codes

Error codeDefinition
invalid_json_lineA line (or multiple) in your input file wasn’t able to be parsed as valid json.

Please ensure no typos, proper opening and closing brackets, and quotes as per JSON standard, and resubmit the request.
too_many_tasksThe number of requests in the input file exceeds the maximum allowed value of 100,000.

Please ensure your total requests are under 100,000 and resubmit the job.
url_mismatchEither a row in your input file has a URL that doesn’t match the rest of the rows, or the URL specified in the input file doesn’t match the expected endpoint URL.

Please ensure all request URLs are the same, and that they match the endpoint URL associated with your Azure OpenAI deployment.
model_not_foundThe Azure OpenAI model deployment name that was specified in the model property of the input file wasn’t found.

Please ensure this name points to a valid Azure OpenAI model deployment.
duplicate_custom_idThe custom ID for this request is a duplicate of the custom ID in another request.
empty_fileThe input file is empty. Please ensure the batch contains at least one request.
model_mismatchThe Azure OpenAI model deployment name that was specified in the model property of this request in the input file doesn’t match the rest of the file.

Please ensure that all requests in the batch point to the same Azure OpenAI in Foundry Models model deployment in the model property of the request.
invalid_requestThe schema of the input line is invalid or the deployment SKU is invalid.

Please ensure the properties of the request in your input file match the expected input properties, and that the Azure OpenAI deployment SKU is globalbatch for batch API requests.
input_modifiedBlob input has been modified after the batch job has been submitted.
input_no_permissionsIt’s not possible to access the input blob. Please check permissions and network access between the Azure OpenAI account and Azure Storage account.

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