Troubleshooting
Diagnose and fix common batch job failures, from JSONL validation errors to quota and authentication issues.
JSONL validation failures
import json
with open("example_batch_input.jsonl") as f:
for i, line in enumerate(f, start=1):
try:
req = json.loads(line)
except json.JSONDecodeError as e:
print(f"Line {i} is not valid JSON: {e}")
continue
for key in ("custom_id", "method", "url", "body"):
if key not in req:
print(f"Line {i} is missing required key: {key}")File-size and request-count limits exceeded
Jobs stuck in validating or in_progress
validating or in_progressPartial failures
Quota errors
Authentication errors (401)
Output parsing
Next steps
Last updated