What batch is really for
The Batch API is the right tool for: nightly classification, periodic backfills, large evaluation runs, dataset annotation, content audits. Anything where 'the answer can land within 24 hours' is true. The trade is ~50% off per-token pricing for that flexibility.
Custom IDs are how you re-key results
Each batch request takes a custom_id. The results stream back keyed by that id, in arbitrary order. Map results back to your domain rows by custom_id, not by position. Treat the batch input list and output stream as two independent collections joined on the id.
Polling, webhooks, and idempotent retry
For light workloads, polling every 30-60 seconds is fine. For production, prefer webhooks (when offered) or scheduled checks. Always make the result-processing step idempotent — re-pulling a finished batch should not double-write your downstream store.