Azure OpenAI Batch API: Receiving Empty Outputs and Errors

Richard E. Fan 10 Reputation points
2025-03-14T22:24:21.9733333+00:00

The structured output format with the batch API has been used successfully for several weeks. Previously, it worked with both the 4o and o3-mini models.

Recently, after updating the prompts and attempting to re-run a task with a JSONL file containing 3002 lines (total size of 98 MB), the output returned 0 bytes with no error files generated. Despite reverting changes and re-uploading a successful job from 4 days ago (which completed 3002/3002 successfully), the current attempt using the same endpoint resulted in 0 completions, 240 errors, and 0 failures.

Is there a possibility that something has changed on the Batch API service side? An inquiry regarding a billing refund has been submitted due to extensive troubleshooting over the past 24 hours, which has consumed a significant number of tokens with minimal output generated.

The o3-mini model works as expected in typical chat-completion mode, and submitting a batch JSONL file of 1 or 10 lines also yields successful results. However, with an increase to 100 lines, consistent failures are encountered, with only 48 out of 100 lines completing, for example.

Are there any insights or suggestions regarding this issue?

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
4,081 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Wang,Xinghao 0 Reputation points
    2025-04-10T14:33:34.4233333+00:00

    I met the same issue: input/output tokens were consumed, but all requests failed. The response and error file I received was as follows.

    response:

    {
      "id": "XXX",
      "completion_window": "24h",
      "created_at": 1744292580,
      "endpoint": "/chat/completions",
      "input_file_id": "indow": "24h",
      "created_at": 1744292580,
      "endpoint": "/chat/completions",
      "input_file_id": "XXX",
      "object": "batch",
      "status": "completed",
      "cancelled_at": null,
      "cancelling_at": null,
      "completed_at": 1744293570,
      "error_file_id": "XXX",
      "errors": null,
      "expired_at": null,
      "expires_at": 1744378980,
      "failed_at": null,
      "finalizing_at": 1744293496,
      "in_progress_at": 1744292982,
      "metadata": null,
      "output_file_id": "XXX",
      "request_counts": {
        "completed": 0,
        "failed": 4,
        "total": 4
      }
    }
    

    error file:

    {"custom_id": "2", "response": {"request_id": "", "status_code": null}, "error": {"code": null, "message": null}}
    {"custom_id": "1", "response": {"request_id": "", "status_code": null}, "error": {"code": null, "message": null}}
    {"custom_id": "3", "response": {"request_id": "", "status_code": null}, "error": {"code": null, "message": null}}
    {"custom_id": "0", "response": {"request_id": "", "status_code": null}, "error": {"code": null, "message": null}}
    

    Did you solve this issue?

    0 comments No comments

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.