# Batch API error- "Request blocked"/"Invalid completion"

**URL:** <https://community.openai.com/t/batch-api-error-request-blocked-invalid-completion/1348604>\
**Category:** API\
**Tags:** batch, batch-api, deep-research, responses-api\
**Created:** [August 16, 2025, 6:54pm UTC](https://community.openai.com/t/batch-api-error-request-blocked-invalid-completion/1348604 "2025-08-16T18:54:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikram\_Karuna](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/vikram_karuna/32/513729_2.png) [@Vikram\_Karuna](https://community.openai.com/u/Vikram_Karuna)\
**Post date:** [August 16, 2025, 6:54pm UTC](https://community.openai.com/t/batch-api-error-request-blocked-invalid-completion/1348604/1 "2025-08-16T18:54:58Z")

</div>

**Description:**

When running ~100 tasks through the Batch API with o4-mini-deep-research, around 30% of requests fail with:

```auto
{"error":{"message":"Request blocked.","type":"invalid_request_error","param":null,"code":"invalid_completion"}}

```

**Findings:**

- With max\_output\_tokens=2048, requests succeed but return empty results.

- With max\_output\_tokens=50000, many requests get blocked.

- It appears that intermediate web search tokens are counted toward max\_output\_tokens, not just the final output tokens.

**Expected behavior:**

max\_output\_tokens should control only the final response length. Intermediate/tool tokens should not cause blocking or truncation.

**Impact:**

This makes it difficult to reliably batch requests with deep research models, as both low and high max\_output\_tokens values produce unusable results.

**Request:**

Please confirm whether this is a bug or intended behavior, and if so, provide guidance or a fix to allow stable batch processing with deep research models.
