Issues sending Azure OAI Batches

John Kronlokken 0 Reputation points
2025-11-30T19:46:36.8133333+00:00

We're attempting to configure Azure OpenAI batch handler.

I uploaded a test JSONL with one line (lifted from Azure OAI template https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/batch?view=foundry-classic&tabs=global-batch%2Cstandard-input%2Cpython-secure&pivots=ai-foundry-portal)

{"custom_id": "task-0", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-5-mini", "messages": [{"role": "system", "content": "You are an AI assistant that helps people find information."}, {"role": "user", "content": "When was Microsoft founded?"}]}}



I've deployed a model with the name 'gpt-5-mini' and keep getting the following error:

Unable to create batch job Request failed with status code 400. Trace ID : 5bd78daf-c6c7-45ed-8879-26876c283ee6Client request ID : dedf148b-1ed1-44c6-8f72-d3637045dcfeAPIM request ID : 5d045a6e-de3b-4908-87f9-56950492928c

Can you assist? Not sure what I'm missing here.

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nikhil Jha (Accenture International Limited) 3,985 Reputation points Microsoft External Staff Moderator
    2025-12-01T09:29:47.7433333+00:00

    Hello John Kronlokken,

    I see you are encountering a 400 Bad Request error when attempting to create a batch job for the gpt-5-mini model.

    Here is the workaround step to fix it: Correct the JSONL model Field vs. Deployment Name

    In Azure OpenAI Batch, the model field inside your JSONL file is not the generic model's name (e.g., "gpt-5-mini"). It must match your Deployment Name exactly.

    Scenario: You deployed the model gpt-5-mini, but did you also name the deployment gpt-5-mini?

    • Example: If you named your deployment my-gpt5-test, but your JSONL says "model": "gpt-5-mini", the batch job will fail validation with a 400 error.
    • Fix: Ensure the value in your JSONL matches your deployment name in Azure AI Foundry exactly (case-sensitive).
    // If your Deployment Name is "my-gpt5-deployment":
    "body": {"model": "my-gpt5-deployment", "messages": ...}
    
    
    

    User's image

    Above screenshot reference is from the link you shared; https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/batch?view=foundry-classic&tabs=global-batch%2Cstandard-input%2Cpython-secure&pivots=ai-foundry-portal

    Official Microsoft Documentation References:


    I hope this helps in providing a way ahead. Kindly "Accept the answer and upvote" to support the community members for similar remediation.

    0 comments No comments

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.