PRODUCTION SCENARIO
A Batch API job submits 40,000 independent requests. The output file has 39,812 lines and their order differs from the input file's.
How should the 188 missing records be reconciled?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: Read the error file named by error_file_id and match its rows back on custom_id
Failed requests have their error information written to an error file found via the batch's error_file_id, and its rows carry the same custom_id, so reconciliation starts there rather than with a re-run. Re-submitting blind repeats requests that may fail for the same reason and pays twice, a request that produced no output line produced no response object and so has no response id to fetch, and assuming a safety filter invents a cause the error file would have named.
Official Source: https://developers.openai.com/api/docs/guides/batch ↗