{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreih6bqybum4nbrral3lntdvwdprb23mvghkcgabmzu4xmfn2rpjgz4",
"uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mnajenwm2ae2"
},
"path": "/t/batch-api-gets-stuck-in-progress-how-to-debugg/1382244#post_1",
"publishedAt": "2026-06-01T16:28:05.000Z",
"site": "https://community.openai.com",
"textContent": "After changing a range of code files, prompts, and QA rules in my local pipeline, this Batch API issue started appearing. I’m having trouble narrowing down whether it is caused by my request structure, Batch queue behavior, prompt size, structured outputs, prompt caching fields, or something else.\n\nI used ChatGPT to help summarize the debugging evidence, but the issue is from my own local API workflow.\n\n**Title:** Batch API validates and enters `in_progress`, but multi-request batch stays `0/N`; one-request batch works\n\nHi, I’m trying to troubleshoot an OpenAI Batch API issue without sharing private product text.\n\nSetup:\n\n * Endpoint: `/v1/chat/completions`\n\n * Model: `gpt-5.4-mini`\n\n * Structured output: `response_format: json_schema`, `strict: true`\n\n * `reasoning_effort: low`\n\n * `max_completion_tokens: 1600`\n\n * Request body also includes `prompt_cache_key` and `prompt_cache_retention: \"24h\"`\n\n\n\n\nWhat works:\n\n * A direct synchronous request using the exact same request body works in ~7 seconds.\n\n * A one-request Batch using the exact same JSONL line completes successfully.\n\n\n\n\nWhat does not work:\n\n * A 15-request Batch validates and moves to `in_progress`, but stays at `0/15` completed for over an hour.\n\n * No `error_file_id`.\n\n * No failed requests.\n\n * No validation error.\n\n * If I cancel it, the error file only contains `batch_cancelled`, so it does not reveal a request-level issue.\n\n\n\n\nBatch/request size:\n\n * 15 requests in JSONL\n\n * Total JSONL size: ~292 KB\n\n * Per-request JSONL line size: ~15.8k–21.8k characters\n\n * Average line size: ~19.4k characters\n\n * Direct-one measured prompt tokens: 4,328\n\n * Direct-one output tokens: around 500–750\n\n * Rough total prompt tokens for 15 requests: ~65k\n\n\n\n\nAccount/model limits shown in Platform UI:\n\n * `gpt-5.4-mini`: 4,000,000 TPM, 5,000 RPM, 40,000,000 TPD\n\n * Budget is not near exhausted\n\n * The UI has a “Batch queue limits” column, but I do not see a clear copied value for this model\n\n\n\n\nQuestions:\n\n 1. Can a multi-request Batch stay at `in_progress 0/N` because of Batch queue/enqueued-token behavior, even when a one-request Batch works?\n\n 2. Are `prompt_cache_key` and `prompt_cache_retention` supported/safe inside Batch request bodies for `/v1/chat/completions`?\n\n 3. Is there any way to get deeper diagnostics for a Batch that validates but never starts completing requests?\n\n 4. Would the recommended next test be:\n\n * remove prompt cache fields,\n\n * split into smaller batches,\n\n * reduce prompt/request size,\n\n * reduce `max_completion_tokens`,\n\n * or switch to `/v1/responses`?\n\n 5. Are there known cases where strict structured outputs can cause hidden retries/stalls without an `error_file_id`?\n\n\n\n\nI can share a fully redacted JSONL line structure if needed, but not the private product text.",
"title": "Batch API gets stuck `in_progress` how to debugg?"
}